jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pier...@locus.apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/server/jsp-tests/jsp/tagext/BodyContent positiveGetEnclosingWriter.jsp positiveGetReader.jsp positiveGetString.jsp
Date Wed, 18 Oct 2000 00:07:03 GMT
pierred     00/10/17 17:07:03

  Modified:    src/server/jsp-tests/jsp/engine/PageContext
                        positivePushBody.jsp
               src/server/jsp-tests/jsp/tagext/BodyContent
                        positiveGetEnclosingWriter.jsp
                        positiveGetReader.jsp positiveGetString.jsp
  Log:
  Since we implemented 'flush=false' in tomcat-4.0, these 4 tests failed.
  It was a bug that they ran previouly. Details below.
  Small fix in each of these tests (simply added pageContext.popBody())
  so they now run properly.
  
  -----
  The following test in watchdog used to succeed:
  
  <%
          BodyContent bc = pageContext.pushBody();
          bc.println(".com");
          out.println(bc.getString());
  %>
  
  However, with the recent changes to support flush=false,
  it does not work anymore. (Actually, 4 tests that use the
  same pattern now fail).
  
  This is because 'out.flush()' used to occur in the page itself
  (so in the test, out would refer to the original JspWriter),
  
          ...
          } finally {
              out.flush();
              _jspxFactory.releasePageContext(pageContext);
          }
  
  while now it is performed within pageContext.release() (so we
  can flush differently whether we are in an include or not).
  
  Because it is now performed in PageContext, the 'out' then
  refers to the BodyContent since no call to popBody() was
  done by the client.
  
  This test should fail (verified with Spec lead) because the client
  has not paired a call to pushBody() with a call to popBody(),
  leaving pageContext in an inconsistent state.
  
  Moreover, there should not be any uses of
  pageContext.pushBody()/popBody() in scripting code.
  [But it is understandable that this is done here
  for testing purposes].
  
  Revision  Changes    Path
  1.2       +1 -0      jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/PageContext/positivePushBody.jsp
  
  Index: positivePushBody.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/engine/PageContext/positivePushBody.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positivePushBody.jsp	2000/10/04 00:21:30	1.1
  +++ positivePushBody.jsp	2000/10/18 00:07:01	1.2
  @@ -21,6 +21,7 @@
   	BodyContent bc = pageContext.pushBody();
   	bc.println(".com");
   	out.println(bc.getString());
  +	pageContext.popBody();
   %>
   </body>
   </html>
  
  
  
  1.2       +3 -1      jakarta-watchdog-4.0/src/server/jsp-tests/jsp/tagext/BodyContent/positiveGetEnclosingWriter.jsp
  
  Index: positiveGetEnclosingWriter.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/tagext/BodyContent/positiveGetEnclosingWriter.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveGetEnclosingWriter.jsp	2000/10/04 00:23:23	1.1
  +++ positiveGetEnclosingWriter.jsp	2000/10/18 00:07:02	1.2
  @@ -17,7 +17,9 @@
   %>
   <!-- checking for JspWriter object -->
   <%= (bc.getEnclosingWriter()) instanceof javax.servlet.jsp.JspWriter %>
  -
  +<%
  +        pageContext.popBody();
  +%>
   
   </body>
   </html>
  
  
  
  1.2       +3 -0      jakarta-watchdog-4.0/src/server/jsp-tests/jsp/tagext/BodyContent/positiveGetReader.jsp
  
  Index: positiveGetReader.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/tagext/BodyContent/positiveGetReader.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveGetReader.jsp	2000/10/04 00:23:23	1.1
  +++ positiveGetReader.jsp	2000/10/18 00:07:02	1.2
  @@ -16,6 +16,9 @@
   %>
   <!-- checking for Reader object -->
   <%= (bc.getReader()) instanceof java.io.Reader %>
  +<%
  +        pageContext.popBody();
  +%>
   
   </body>
   </html>
  
  
  
  1.2       +1 -1      jakarta-watchdog-4.0/src/server/jsp-tests/jsp/tagext/BodyContent/positiveGetString.jsp
  
  Index: positiveGetString.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/jsp-tests/jsp/tagext/BodyContent/positiveGetString.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- positiveGetString.jsp	2000/10/04 00:23:23	1.1
  +++ positiveGetString.jsp	2000/10/18 00:07:02	1.2
  @@ -15,7 +15,7 @@
   	BodyContent bc = pageContext.pushBody();
   	bc.println("Checking For getString() method");
   	out.println(bc.getString());
  -		
  +	pageContext.popBody();		
   %>
   
   
  
  
  

Mime
View raw message