I currently have a servlet displaying a page with dynamic information retrieved from the database. And of course I have out.println() all over the place..in addition I also have a second PrintWriter declared in my servlet which writes a duplicate information (same as the information displayed by my servlet) into a FileOutputStream in order to achieve writing to a file (static html page, which contains all of the information displayed by the servlet)...
My question is: if I decide to modify my code and use JSP instead of a servlet to display my information..(in order to avoid the tidious out.println() and yes I have to use JSP and avoid using the servlet) is there a way to capture the information displayed by my JSP and write it to a file after the JSP generates the html and displays it in the browser?
I have searched the internet and read some incomplete solutions using Filters and HttpURLConnection, i'm not too familiar with either one of them, I have tried using it and did not succeed. Is there an easier solution... I do have my new JSP working and it is displaying the same information that was previously displayed by the servlet...but How can I retrieve the html generated by the JSP and save it as an external html or plain text file...(it's used for confirmation purposes)?
Maybe anyone has a neat JavaScript solution to this problem? any help would be greatly appreciated
[ December 06, 2004: Message edited by: Marty Str ]
[ December 06, 2004: Message edited by: Marty Str ]