Highlighted

Submit PDF form to Servlet

Avatar

Guest

15-12-2008

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.