redirecting a servlet response to a file
Is there a way to redirect the response objects output buffer to a file instead of to the client (browser)?
I am using the jsp to process a set of jsp templates (using the RequestDispatcher's include method) and I would like to send the resulting html to a file, NOT to the client.
Any ideas.
Thanks,
Jay
jaywright00@yahoo.com
The problem is that I'm not generating code with out.println() statements, I'm relying on the servlet engine to generate the html from jsp templates.
For example, my code uses the RequestDispatcher.include(request, response) to access and process a jsp template, which in turn may include another jsp template, and so forth and so on, and it is my understanding that there is an output buffer that is being written and will finally be sent to the client. I want to intercept this and send *that* to a file.
Thoughts?