Craig R. McClanahan wrote:

>>So how can I call include or any similar function like include without
>>flush?  Since in that include page, I have error checkings. If have errors,
>>then will forward to some pages.
>>Once JSP flushed, I can't do forward any more. Or any solution for that?
>>
>>
> 
> I'd suggest an approach based on what the generated code created by Jasper
> does to implement <jsp:include ... flush="false"/>.  It calls a utility
> method to wrap the current JspWriter() in a response, and uses
> RequestDispatcher.include() to execute the included resource.  As a
> result, the output is buffered to the current writer and the response is
> not committed.


But, as has been previously discussed (see archives), note that this 
will more or less only work on Tomcat4, since other servlet engines call 
getServletOutputStream instead. The portable solution is "a bit" nastier 
than what Craig outlines above.

/Rickard


-- 
Rickard Öberg
Software Development Specialist
xlurc - Xpedio Linköping Ubiquitous Research Center
Author of "Mastering RMI"
Email: [EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to