I am facing one problem in my current project. The scenario is as follows:-
(I am using Servlet 2.4 spec, Tomcat 4.14, jdk 1.4 and Struts 1.2)
Following abbr i have used:-
PL - Project List Page
SPO - Select Print Option Page
PDP - Project Detail Print Page
1) In one of the screens i display the list of projects (PL).
2) In this screen, an option is given to the user to select projects which he wants to print.
3) The user then selects, the projects he wants and selects the print option in a combo box provided in the screen and clicks on submit button.
4) The control is transferred to an Action class which displays a page (SPO) where in the user can select few more options related to the details of the projects selected needs to be printed.
5) The user selects his option and clicks on print button .... which triggers a POP-UP window, (PDP) where the user can see the details of the projects he has selected on the PL page.
6) Now, the user can select File->Print option of the browser to print the page.
7) Now in the POP-UP page i need to give functionality to the user to save the page he sees, as a file which he can view at later time. Using File-->Save As its somewhat possible in Firefox but not in IE.
So the flow is something like this :-
PL ---> SPO ----> PDP
....How can i let the user to save the page ? Please help me!
I am not able to think of any solution to this problem.
So the page being displayed is the direct result of a POST. That's something you should avoid anyway - you can use the PRG pattern for that. This article also talks about that a bit.
[ July 17, 2008: Message edited by: Ulf Dittmer ]
Project List Page ---> Select Print Option Page(Same IE Browser Window)---->Project Details Page(this is a New IE Window which is in fact a pop-up window) ... now in this new IE window, the HTML page i see ... needs to be saved. So when user goes for File --> Save As option in the IE browser window, he browses to the location in the local machine where he wants to save the file, and then clicks on the "Save" button. At this point of time as i have observed in the console, the browser places another request, even though there is no form tag or form elements in the page.
and i tried hard but did not get the PRG Pattern ...what it is ? .... pleae help me !
So when user goes for File --> Save As option in the IE browser window, he browses to the location in the local machine where he wants to save the file, and then clicks on the "Save" button. At this point of time as i have observed in the console, the browser places another request, even though there is no form tag or form elements in the page.
This is where you lost me. It's a page that was opened when the user clicked a link on the main page. How can it be missing any of the parameters? If the popup window is the result of POST, then you should change it so that it's a GET, with all parameter passed in the URL. Then you'll have no problems with lost parameters.