The action <jsp:forward> generates a call to PageContextImpl.forward(),
so the patch affects how this action works.  The following test

<%@ page buffer="none" %>
<jsp:forward page="test.jsp"/>

used to raise an ISE, now it does not.  The test for buffersize might
not be the best way to implement the part of the spec (that was before
my time), but it got the job done.  The patch may (and should) break
some TCK tests.

-Kin-man

> Date: Thu, 18 Mar 2004 22:23:12 +0000
> From: Mark Thomas <[EMAIL PROTECTED]>
> Subject: RE: cvs commit: 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime 
JspWriterImpl.java
> To: 'Tomcat Developers List' <[EMAIL PROTECTED]>
> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> Thread-index: AcQNM+1cLsjNLxfdTQ2XKdmvPyCgnAAAa/UA
> 
> Kin-man,
> 
> The original bug report was that Jasper threw an exception on an immediate
> pageContext.forward() on an unbuffered page. My reading of the spec is that 
this
> shouldn't happen. I can't see how this check helps meet the part of the spec 
you
> quoted.
> 
> Am I being stupid and missing the blindingly obvious here?
> 
> Mark
> 
> > -----Original Message-----
> > From: Kin-Man Chung [mailto:[EMAIL PROTECTED] 
> > Sent: Thursday, March 18, 2004 9:57 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: cvs commit: 
> > jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runt
> > ime JspWriterImpl.java
> > 
> > -1.  The patch breaks the spec.
> > 
> > According to JSP 2.0 spec, JSP.5.5 (p1-111),
> > 
> >     "If the page output was unbuffered and anything has been 
> > written to
> >     it, an attempt to forward the request will result in an
> >     IllegalStateException."
> >     
> > -Kin-man
> >  
> > > Date: Thu, 18 Mar 2004 21:05:17 +0000
> > > From: [EMAIL PROTECTED]
> > > Subject: cvs commit: 
> > jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime 
> > JspWriterImpl.java
> > > To: [EMAIL PROTECTED]
> > > 
> > > markt       2004/03/18 13:05:17
> > > 
> > >   Modified:    jasper2/src/share/org/apache/jasper/runtime
> > >                         JspWriterImpl.java
> > >   Log:
> > >   - Fix bug 13499. Remove unnecssary bufferSize check
> > >   - Ported from TC4
> > >   
> > >   Revision  Changes    Path
> > >   1.10      +0 -3      
> > jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runt
> > ime/JspWriterImpl.
> > java
> > >   
> > >   Index: JspWriterImpl.java
> > >   
> > ===================================================================
> > >   RCS file: 
> > /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/j
> > asper/runtime/JspW
> > riterImpl.java,v
> > >   retrieving revision 1.9
> > >   retrieving revision 1.10
> > >   diff -u -r1.9 -r1.10
> > >   --- JspWriterImpl.java  17 Mar 2004 19:23:04 -0000      1.9
> > >   +++ JspWriterImpl.java  18 Mar 2004 21:05:17 -0000      1.10
> > >   @@ -139,9 +139,6 @@
> > >         * Discard the output buffer.
> > >         */
> > >        public final void clear() throws IOException {
> > >   -        if (bufferSize == 0)
> > >   -            throw new IllegalStateException(
> > >   -                    
> > getLocalizeMessage("jsp.error.ise_on_clear"));
> > >            if (flushed)
> > >                throw new IOException(
> > >                        
> > getLocalizeMessage("jsp.error.attempt_to_clear_flushed_buffer"));
> > >   
> > >   
> > >   
> > > 
> > > 
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to