You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/11/07 14:02:02 UTC
DO NOT REPLY [Bug 37381] New: -
pageContext.forward causes Illegal to clear() when buffer size == 0
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37381>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37381
Summary: pageContext.forward causes Illegal to clear() when
buffer size == 0
Product: Tomcat 5
Version: 5.0.28
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: carl@zero-one.co.za
I have certain JSP pages where no buffer is required - or rather a buffer of 0
IS required - being set via: <%@ page buffer="none" %>. On this implementation
a security check is performed (session based) and if it fails, I do a
pageContext.forward("/somepath/jsp"). Works file, except on the pages where <%@
page buffer="none" %> is specified.
Exception details:
Illegal to clear() when buffer size == 0
java.lang.IllegalStateException
at org.apache.jasper.runtime.JspWriterImpl.clear(JspWriterImpl.java:144)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:646)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
at com.unysen.security.SecurityCheckTag.doStartTag(SecurityCheckTag.java:179)
Would it not be safe to do a:
if (pageContext.getOut().getBufferSize() > 0)
JspWriterImpl.clear();
Not sure if this is required by the JSP spec or not, but seems like a logical
check to make :)
Thanks.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org