For websites that typically display information that doesn't change often
(ie: a bookstore, etc), it doesn't make sense to regenerate catalogue type
pages on every web request.
For architectures using the Model 2 servlet jsp interaction (servlet
pre-populates a bean and sends it off to a jsp), a simple web server side
html cache can be implemented if the servlet can capture the output of the
jsp and save it to a file, and later just serve that file until you decide
to regenerate the page again.
I have tried to implement this, but I can't come up with the simple code
to capture jsp output from within the servlet.
The problem essentially boils down to this:
Whereas before I had the following line of code:
//send beans from servlet to jsp and client
getRequestDispatcher("someJSP.jsp").forward(req, resp);
I need to replace it with some code that will not forward the
request and response but instead capture the output of the jsp.
The closest thing I have found is:
getRequestDispatcher("someJSP.jsp").include(req, resp);
But this adds the content to the response object, and I don't
know how to take that content out of the response and save it to a file..
Does anyone have any ideas?
thanks,
Floyd Marinescu
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html