Marco Fasoletti wrote:
> Thanks for the answer.
> How do you overcome the include and forward problem?
This appears to be a problem with *every* JSP 1.0 or 1.1 engine and part
of what the group working on the JSP 1.2 and Servlet 2.3 specs are
trying to fix. Basically, if you <jsp:include.../> a page and then
something happens that throws an exception later in your document, the
errorPage mechanism will fail. This is because the JSP engine must
flush() its output before the <jsp:include.../> starts and after it
finishes (correct me if I'm wrong here, folks). No amount of buffering
will help since this is explicitly flushed.
The only workaround is to use the non-dynamic <%@include ...%> mechanism
and a large buffer that can hold the entire page output.
Perhaps another workaround would be to write your own <my:include.../>
tag that could do some sort of dynamic include that does not flush the
buffer. I don't think anyone has done this yet.
-=- D. J.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets