tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat/src/tests/webpages/WEB-INF/classes/params IncludeIncludeISParams.java
Date Sat, 10 Feb 2001 23:30:28 GMT
costin      01/02/10 15:30:28

  Modified:    src/tests/webpages/WEB-INF test-tomcat.xml
  Added:       src/tests/webpages/WEB-INF/classes/params
                        IncludeIncludeISParams.java
  Log:
  One more test with multiple includes in a chain.
  
  ( previous commit had a little more than it should, I forgot to localize
  the commit to the affected file - anyway it's nothing wrong )
  
  Revision  Changes    Path
  1.21      +21 -1     jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml
  
  Index: test-tomcat.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/tests/webpages/WEB-INF/test-tomcat.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- test-tomcat.xml	2001/02/10 22:37:32	1.20
  +++ test-tomcat.xml	2001/02/10 23:30:27	1.21
  @@ -16,7 +16,7 @@
           early tests.
       -->
   
  -     <property name="revision" value="$Revision: 1.20 $" />  
  +     <property name="revision" value="$Revision: 1.21 $" />  
        <property name="host" value="127.0.0.1" />
        <property name="port"     value="8080" />
        <property name="outputType"     value="text" />
  @@ -279,6 +279,26 @@
             <responseMatch match="/include1:b = [ n ]" magnitude="false" />
             <responseMatch match="postInclude1:a = [ k ]" />
             <responseMatch match="postInclude1:c = [ l ]" />
  +      </httpClient>
  +    
  +      <httpClient>
  +          <comment>2 RequestDispatchers, Body read in the second </comment>
  +          <httpRequest 
  +              path="/test/servlet/params.IncludeIncludeISParams" 
  +              method="POST">
  +             <param name="a" value="k" type="GET" />
  +             <param name="c" value="l" type="GET"/>
  +             <param name="a" value="m" type="POST"/>
  +             <param name="b" value="n" type="POST"/>
  +          </httpRequest>
  +          <!-- BODY - read with IS, inside the included servlet -->
  +          <responseMatch match="a=m&amp;b=n" />
  +
  +          <responseMatch match="/include1:c = [ l ]" />
  +          <responseMatch match="/include1:a = [ b , x , k ]" />
  +          <responseMatch match="/include1:a = [ m ]" magnitude="false" />
  +          <responseMatch match="postInclude1:a = [ x , k ]" />
  +          <responseMatch match="postInclude0:a = [ k ]" />
         </httpClient>
       
   
  
  
  
  1.1                  jakarta-tomcat/src/tests/webpages/WEB-INF/classes/params/IncludeIncludeISParams.java
  
  Index: IncludeIncludeISParams.java
  ===================================================================
  package params;
  
  import java.io.*;
  import java.text.*;
  import java.util.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  /**
   *  Double include
   */
  public class IncludeIncludeISParams extends HttpServlet {
  
      public void service(HttpServletRequest request,
  			HttpServletResponse response)
          throws IOException, ServletException
      {
          response.setContentType("text/plain");
          PrintWriter out = response.getWriter();
  
  	// No parameter is read 
  
  	String uri="params.RDIncludeISParams?a=x";
  	out.println("Calling RD.include for: " + uri);
  	RequestDispatcher rd=request.getRequestDispatcher(uri);
  
  	rd.include( request, response );
  
  	ServletUtil.printParamValues( "", " ]",
  				      "postInclude0:", " = [ ",
  				      "", "",
  				      " , ",
  				      request, out );
      }
  
  }
  
  
  
  
  
  

Mime
View raw message