This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I am calling the script on load but by that time the forward is already done and control doesnt goes to the script. Is there a way to run both? There is no restriction on when the script can be run. Any time is ok. But I dont get any funtions that run the script before the load of the page.
I put the jspforward inside the script, the forward happens but the window doesnt open.
First, I'm going to pose a few questions; why are you forwarding from one JSP to another instead of JSP to Servlet or just posting a form that sends data to the servlet.
Secondly, how is the forward being called? Is it with an ajax script (like by DWR) if so, add the window popup to the callback function.
Ray
Sree Lakshmi Sugunan
Greenhorn
Joined: Feb 29, 2008
Posts: 23
posted
0
Hi
I am sorry for the wrong description. The forward is to another servlet only. I have a parent submit jsp from where I submit to a servlet(to generate a report). From this servlet if the report type is pdf(content type is pdf), I forward to a intermediate jsp. The purpose of this jsp is to set certain headers and add the javascript content to html(this isto create a webtrend log req an image to server onload of page.). After running this script, I forward it to another servlet to write back the pdf response.
The issue is I cant write to the client before the forward. So I thought of opening a new explorer using a script and run the add javascript through that browser so that the intermediate jsp can go ahead with the forward.
First of all I am not sure if this works because when I try, I invoke the script onload but the control goes to the servlet with the forward and doesnt reach the script. If forward is there cant we do any thing else in the page to send to client
I had another post also for a another issue of this problem (Generate PDF report from jsp) which has more details of the issue.
Originally posted by Sree Lakshmi Sugunan: I had another post also for a another issue of this problem (Generate PDF report from jsp) which has more details of the issue.
Ah yes, I though this sounded familiar. Did you understand Ulf's solution to your issue in that topic?
I'm going to close this topic and we can continue to discuss this in the original topic.