tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kin...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime PageContextImpl.java
Date Thu, 25 Apr 2002 18:16:06 GMT
kinman      02/04/25 11:16:06

  Modified:    jasper2/src/share/org/apache/jasper/compiler Generator.java
               jasper2/src/share/org/apache/jasper/runtime
                        PageContextImpl.java
  Log:
  - Fixed 6196.  If the buffer was flushed, a forward should cause a
    IllegalStateException instead of IOException.
  
  Revision  Changes    Path
  1.6       +3 -5      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Generator.java	19 Apr 2002 20:35:01 -0000	1.5
  +++ Generator.java	25 Apr 2002 18:16:06 -0000	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
1.5 2002/04/19 20:35:01 kinman Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/04/19 20:35:01 $
  + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
1.6 2002/04/25 18:16:06 kinman Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/04/25 18:16:06 $
    *
    * ====================================================================
    * 
  @@ -361,8 +361,6 @@
   
   	    out.printil("if (true) {");	// So that javac won't complain about
   	    out.pushIndent();		// codes after "return"
  -
  -	    out.printil("out.clear();");
   	    out.printin("pageContext.forward(");
   	    out.print  (attributeValue(n.getPage(), false));
   	    printParams(n);
  
  
  
  1.3       +11 -3     jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PageContextImpl.java	31 Mar 2002 09:02:52 -0000	1.2
  +++ PageContextImpl.java	25 Apr 2002 18:16:06 -0000	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
1.2 2002/03/31 09:02:52 remm Exp $
  - * $Revision: 1.2 $
  - * $Date: 2002/03/31 09:02:52 $
  + * $Header: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
1.3 2002/04/25 18:16:06 kinman Exp $
  + * $Revision: 1.3 $
  + * $Date: 2002/04/25 18:16:06 $
    *
    * ====================================================================
    *
  @@ -401,6 +401,14 @@
       public void forward(String relativeUrlPath)
           throws ServletException, IOException
       {
  +	// JSP.4.5 If the buffer was flushed, throw IllegalStateException
  +	try {
  +	    out.clear();
  +	} catch (IOException ex) {
  +	    throw new IllegalStateException(Constants.getString(
  +			"jsp.error.attempt_to_clear_flushed_buffer"));
  +	}
  +
   	// Make sure that the response object is not the wrapper for include
   	while (response instanceof HttpServletResponseWrapper)
   	    response = ((HttpServletResponseWrapper)response).getResponse();
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message