[opencms-dev] Clarification on Redirects and stream="true"

Cory L Hubert cory.hubert at ampagency.com
Wed Feb 25 16:33:02 CET 2004


	Some of my jsp do redirects as follows....
	CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
	cms.getRequestContext().getResponse().sendRedirect(forward);

	This worked on my windows environment and used to work on my linux(staging)
environment.

	Yesterday it started breaking on the linux environment...  The error it
threw was

java.lang.IllegalStateException: getOutputStream() has already been called
for this response

	After doing some research I found in the Advanced JSP documentation under
Redirects that "default buffering can be turned off by setting the JSP
property "stream" to "true", in which case the output is written to the
stream as soon as it becomes available. This property must be set on a
"per-JSP" basis. If "stream" is set to "true" you can not redirect after
anything has been written to the response, as it is usual in standard JSP
developing."

	What does that mean?  Whatever it is... I no longer have that jsp
redirecting problem when I set that stream property to true.  Could someone
explain why this would happen in linux and not windows?




More information about the opencms-dev mailing list