I have a question regarding the buffering of output
after calling RequestDispatcher.include from a
servlet.  I have a servlet that reads a config file,
connects to specified databases, and determines which
jsp template to evaluate according to http input
parameters and a
database lookup. From the servlet I use the
RequestDispatcher.include method to evaluate the
corresponding JSP template.  The problem I'm having is
with error handling. In our current system, written
using the Netscape Application Server 2.11, an error
is handled by clearing the output buffer and
evaluating the error template associated with the
error that occurred. In the JSP world, it seems that
once the RequestDispatcher.include method has been
called there is no way to clear the output of the
HttpServletResonse object. I tried creating my own
HttpServletResponse object making use of a
ByteArrayOutputStream but I get a ClassCastException
out of the RequestDispatcher. I tried this with both
JRun2.3 and jswdk-1.0.  I was wondering if there is
any way to work around this? I really need to buffer
the output so that I can present the user with the
appropriate error page if an error occurs.

Any help would be appreciated.

Thanks
Sergio

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to