Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Submit PDF form to Servlet

Avatar

Former Community Member
Hello



I have a PDF form with a Submit button which when clicked should post this to a servlet. The servlet should receive the PDF and email it a designated mail box. Since we would like the email to be sent from a dedicated mail address, we are using this approach instead of the Livecycle designer's email button.



The problem now: I have set the Submit As property on the button to PDF and provided my servlet URL in the form using LiveCycle designer.



In my servlet, I have the code "System.out.println(request.getQueryString());" to see what data I am receving. However, everytime I submit the form "null" is being printed on the console. I am not able to understand how to get this filled out PDF form attached and emailed.



Right now, I have the following code in my servlet which is attaching a PDF located on my hard disk to email and this works fine.



messageBodyPart = new MimeBodyPart();

DataSource source = new FileDataSource("C:/file.PDF");



But how do I make sure the form that will be received by the Servlet be emailed. Appreciate any help.
0 Replies