In my current working form - by clicking a button a pdf Report is populated in new Window. The requirement is, when a pdf report is generated, the calling page should be redirected to another page.
The problem I am facing is, passing the control back to the calling page.
I tried by writing a pageForward method in doReport method which is called by the new window that shows the report. The page is not getting forwarded but it is showing in the tomcat that it entered the second page. I tried writing the forward method in doPrint method with which the control is going to other page but the popup is not getting called. The doPrint method is called when print button is clicked.
Now how should I make the calling page get forwarded to another page and also show the report in new window.
Please let me know if you have any ideas how this can be implemented.I thought of using reflection which i coudn't.
This really has nothing to do with reflection. You might want to read UseAMeaningfulSubjectLine for tips on creating a subject that better describes your question.
I think I understand your problem now. You want two things to happen when you click on a link. The first is to download a PDF and the second is to refresh the page on which the link was clicked. There is nothing in the servlet API for doing this. The issue is in the HTTP protocol itself. With HTTP, there can only be one response per request (either the PDF or the new page).
You might be able to settle for a solution that involves clicking the link to have the page redrawn and having a link on the new page that can be used to retrieve the PDF.
I'm going to change the subject to: "Downloading PDF and re-drawing page" when it gets there. [ December 07, 2007: Message edited by: Ben Souther ]