I am facing problem generating a PDF and subsequently mailing it using
JavaMail. Following is a step by step explanation of what I am trying to
1. A JSP page displays a list of documents with options to view,
email and print the documents
2. When the user clicks on the email icon a pop up window is
generated which asks for the "To" "From" and "Sub" email fields. The
command I use to generate pop up window is:
I am unable to validate the form fields in the pop up window before
submitting it to a servlet but that is not a very major issue
3. The data from the Popup window is than captured in the servlet
using the request object. Pop up window exits automatically after the
submit button is clicked.
4. This servlet does some data processing and builds a xsl template
and xml. Than I forward the request to another servlet using the
I also add a few attributes to the request object here.
5. This servlet generates dynamic pdf correctly. However while
generating static pdf it throws a socket reset by peer exception at the
6. The decision to generate dynamic or static pdf is taken based on
a request attribute set by me in the servlet which processes the popup
7. Independently JavaMail works fine, Static pdf is also
successfully generated but without request parameters being passed. The
problem is only when I try to integrate all these features together.
Can somebody please help me how to achieve this functionality. If there
is a better design approach I can implement that and try it.
[Non-text portions of this message have been removed]