tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/tester/web/WEB-INF web.xml
Date Thu, 03 May 2001 23:06:36 GMT
craigmcc    01/05/03 16:06:36

  Modified:    tester/src/bin tester.xml
               tester/web/WEB-INF web.xml
  Added:       tester/src/tester/org/apache/tester Forward00.java
                        Forward00a.java Forward00d.java Include00.java
                        Include00a.java Include00d.java
               tester/web Forward00b.jsp Forward00c.jsp Forward00e.jsp
                        Include00b.jsp Include00c.jsp Include00e.jsp
  Log:
  Add unit tests to cover the combinations of include vs forward, servlet
  vs JSP page vs <jsp-file>, and named versus path-based dispatching.
  
  Revision  Changes    Path
  1.39      +82 -0     jakarta-tomcat-4.0/tester/src/bin/tester.xml
  
  Index: tester.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/src/bin/tester.xml,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- tester.xml	2001/05/03 18:41:30	1.38
  +++ tester.xml	2001/05/03 23:06:28	1.39
  @@ -331,6 +331,88 @@
   
     <target name="RequestDispatcher">
   
  +    <!-- ========== Basic Forward and Include Functionality =============== -->
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Forward00?path=/Forward00a"
  +      outContent="Forward00a PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedForward00?path=/Forward00a"
  +      outContent="Forward00a PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Forward00?path=/Forward00b"
  +      outContent="Forward00b PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedForward00?path=/Forward00b"
  +      outContent="Forward00b PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Forward00?path=/Forward00c.jsp"
  +      outContent="Forward00c PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedForward00?path=/Forward00c.jsp"
  +      outContent="Forward00c PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Forward00?path=!Forward00d"
  +      outContent="Forward00d PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedForward00?path=!Forward00d"
  +      outContent="Forward00d PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Forward00?path=!Forward00e"
  +      outContent="Forward00e PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedForward00?path=!Forward00e"
  +      outContent="Forward00e PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Include00?path=/Include00a"
  +      outContent="Include00a PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedInclude00?path=/Include00a"
  +      outContent="Include00a PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Include00?path=/Include00b"
  +      outContent="Include00b PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedInclude00?path=/Include00b"
  +      outContent="Include00b PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Include00?path=/Include00c.jsp"
  +      outContent="Include00c PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedInclude00?path=/Include00c.jsp"
  +      outContent="Include00c PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Include00?path=!Include00d"
  +      outContent="Include00d PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedInclude00?path=!Include00d"
  +      outContent="Include00d PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/Include00?path=!Include00e"
  +      outContent="Include00e PASSED" debug="${debug}"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedInclude00?path=!Include00e"
  +      outContent="Include00e PASSED" debug="${debug}"/>
  +
       <!-- ========== Forward and Include to Static Resource ================ -->
   
       <tester host="${host}" port="${port}" protocol="${protocol}"
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Forward00.java
  
  Index: Forward00.java
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *      Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.      *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  package org.apache.tester;
  
  
  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  /**
   * Exercise basic forwarding functionality.
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2001/05/03 23:06:31 $
   */
  
  public class Forward00 extends HttpServlet {
  
  
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws IOException, ServletException {
  
          // Prepare this response
          StringBuffer sb = new StringBuffer();
          response.setContentType("text/plain");
  	PrintWriter writer = response.getWriter();
  
          // Acquire the path to which we will issue a forward
          String path = request.getParameter("path");
          if (path == null)
              path = "/Forward00a";
  
          // Create a request dispatcher and call forward() on it
          RequestDispatcher rd = null;
          if (path.startsWith("!"))
              rd = getServletContext().getNamedDispatcher(path.substring(1));
          else
              rd = getServletContext().getRequestDispatcher(path);
          if (rd == null) {
              sb.append(" No RequestDispatcher returned/");
          } else {
              if (sb.length() < 1)
                  rd.forward(request, response);
          }
  
          // Write our response if an error occurred
          if (sb.length() >= 1) {
              writer.print("Forward00 FAILED -");
              writer.println(sb.toString());
              while (true) {
                  String message = StaticLogger.read();
                  if (message == null)
                      break;
                  writer.println(message);
              }
          }
          StaticLogger.reset();
  
      }
  
  }
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Forward00a.java
  
  Index: Forward00a.java
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *      Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.      *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  package org.apache.tester;
  
  
  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  /**
   * Exercise basic forwarding functionality.
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2001/05/03 23:06:31 $
   */
  
  public class Forward00a extends HttpServlet {
  
  
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws IOException, ServletException {
  
          // Prepare this response
          StringBuffer sb = new StringBuffer();
          response.setContentType("text/plain");
  	PrintWriter writer = response.getWriter();
  
          // Write our response if an error occurred
          writer.print("Forward00a PASSED");
          while (true) {
              String message = StaticLogger.read();
              if (message == null)
                  break;
              writer.println(message);
          }
          StaticLogger.reset();
  
      }
  
  }
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Forward00d.java
  
  Index: Forward00d.java
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *      Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.      *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  package org.apache.tester;
  
  
  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  /**
   * Exercise basic forwarding functionality.
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2001/05/03 23:06:31 $
   */
  
  public class Forward00d extends HttpServlet {
  
  
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws IOException, ServletException {
  
          // Prepare this response
          StringBuffer sb = new StringBuffer();
          response.setContentType("text/plain");
  	PrintWriter writer = response.getWriter();
  
          // Write our response if an error occurred
          writer.print("Forward00d PASSED");
          while (true) {
              String message = StaticLogger.read();
              if (message == null)
                  break;
              writer.println(message);
          }
          StaticLogger.reset();
  
      }
  
  }
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Include00.java
  
  Index: Include00.java
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *      Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.      *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  package org.apache.tester;
  
  
  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  /**
   * Exercise basic including functionality.
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2001/05/03 23:06:31 $
   */
  
  public class Include00 extends HttpServlet {
  
  
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws IOException, ServletException {
  
          // Prepare this response
          StringBuffer sb = new StringBuffer();
          response.setContentType("text/plain");
  	PrintWriter writer = response.getWriter();
  
          // Acquire the path to which we will issue a include
          String path = request.getParameter("path");
          if (path == null)
              path = "/Include00a";
  
          // Create a request dispatcher and call include() on it
          RequestDispatcher rd = null;
          if (path.startsWith("!"))
              rd = getServletContext().getNamedDispatcher(path.substring(1));
          else
              rd = getServletContext().getRequestDispatcher(path);
          if (rd == null) {
              sb.append(" No RequestDispatcher returned/");
          } else {
              if (sb.length() < 1)
                  rd.include(request, response);
          }
  
          // Write our response if an error occurred
          if (sb.length() >= 1) {
              writer.print("Include00 FAILED -");
              writer.println(sb.toString());
              while (true) {
                  String message = StaticLogger.read();
                  if (message == null)
                      break;
                  writer.println(message);
              }
          }
          StaticLogger.reset();
  
      }
  
  }
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Include00a.java
  
  Index: Include00a.java
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *      Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.      *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  package org.apache.tester;
  
  
  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  /**
   * Exercise basic including functionality.
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2001/05/03 23:06:31 $
   */
  
  public class Include00a extends HttpServlet {
  
  
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws IOException, ServletException {
  
          // Prepare this response
          StringBuffer sb = new StringBuffer();
          response.setContentType("text/plain");
  	PrintWriter writer = response.getWriter();
  
          // Write our response if an error occurred
          writer.print("Include00a PASSED");
          while (true) {
              String message = StaticLogger.read();
              if (message == null)
                  break;
              writer.println(message);
          }
          StaticLogger.reset();
  
      }
  
  }
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/Include00d.java
  
  Index: Include00d.java
  ===================================================================
  /* ========================================================================= *
   *                                                                           *
   *                 The Apache Software License,  Version 1.1                 *
   *                                                                           *
   *      Copyright (c) 1999, 2000, 2001  The Apache Software Foundation.      *
   *                           All rights reserved.                            *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * Redistribution and use in source and binary forms,  with or without modi- *
   * fication, are permitted provided that the following conditions are met:   *
   *                                                                           *
   * 1. Redistributions of source code  must retain the above copyright notice *
   *    notice, this list of conditions and the following disclaimer.          *
   *                                                                           *
   * 2. Redistributions  in binary  form  must  reproduce the  above copyright *
   *    notice,  this list of conditions  and the following  disclaimer in the *
   *    documentation and/or other materials provided with the distribution.   *
   *                                                                           *
   * 3. The end-user documentation  included with the redistribution,  if any, *
   *    must include the following acknowlegement:                             *
   *                                                                           *
   *       "This product includes  software developed  by the Apache  Software *
   *        Foundation <http://www.apache.org/>."                              *
   *                                                                           *
   *    Alternately, this acknowlegement may appear in the software itself, if *
   *    and wherever such third-party acknowlegements normally appear.         *
   *                                                                           *
   * 4. The names  "The  Jakarta  Project",  "Tomcat",  and  "Apache  Software *
   *    Foundation"  must not be used  to endorse or promote  products derived *
   *    from this  software without  prior  written  permission.  For  written *
   *    permission, please contact <apache@apache.org>.                        *
   *                                                                           *
   * 5. Products derived from this software may not be called "Apache" nor may *
   *    "Apache" appear in their names without prior written permission of the *
   *    Apache Software Foundation.                                            *
   *                                                                           *
   * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES *
   * INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY *
   * AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL *
   * THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY *
   * DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL *
   * DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS *
   * OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION) *
   * HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT, *
   * STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
   * ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE *
   * POSSIBILITY OF SUCH DAMAGE.                                               *
   *                                                                           *
   * ========================================================================= *
   *                                                                           *
   * This software  consists of voluntary  contributions made  by many indivi- *
   * duals on behalf of the  Apache Software Foundation.  For more information *
   * on the Apache Software Foundation, please see <http://www.apache.org/>.   *
   *                                                                           *
   * ========================================================================= */
  
  package org.apache.tester;
  
  
  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;
  
  /**
   * Exercise basic including functionality.
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2001/05/03 23:06:32 $
   */
  
  public class Include00d extends HttpServlet {
  
  
      public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws IOException, ServletException {
  
          // Prepare this response
          StringBuffer sb = new StringBuffer();
          response.setContentType("text/plain");
  	PrintWriter writer = response.getWriter();
  
          // Write our response if an error occurred
          writer.print("Include00d PASSED");
          while (true) {
              String message = StaticLogger.read();
              if (message == null)
                  break;
              writer.println(message);
          }
          StaticLogger.reset();
  
      }
  
  }
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/web/Forward00b.jsp
  
  Index: Forward00b.jsp
  ===================================================================
  <%@ page contentType="text/plain" %>Forward00b PASSED
  requestURI=<%= request.getRequestURI() %>
  contextPath=<%= request.getContextPath() %>
  servletPath=<%= request.getServletPath() %>
  pathInfo=<%= request.getPathInfo() %>
  queryString=<%= request.getQueryString() %>
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/web/Forward00c.jsp
  
  Index: Forward00c.jsp
  ===================================================================
  <%@ page contentType="text/plain" %>Forward00c PASSED
  requestURI=<%= request.getRequestURI() %>
  contextPath=<%= request.getContextPath() %>
  servletPath=<%= request.getServletPath() %>
  pathInfo=<%= request.getPathInfo() %>
  queryString=<%= request.getQueryString() %>
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/web/Forward00e.jsp
  
  Index: Forward00e.jsp
  ===================================================================
  <%@ page contentType="text/plain" %>Forward00e PASSED
  requestURI=<%= request.getRequestURI() %>
  contextPath=<%= request.getContextPath() %>
  servletPath=<%= request.getServletPath() %>
  pathInfo=<%= request.getPathInfo() %>
  queryString=<%= request.getQueryString() %>
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/web/Include00b.jsp
  
  Index: Include00b.jsp
  ===================================================================
  <%@ page contentType="text/plain" %>Include00b PASSED
  requestURI=<%= request.getRequestURI() %>
  contextPath=<%= request.getContextPath() %>
  servletPath=<%= request.getServletPath() %>
  pathInfo=<%= request.getPathInfo() %>
  queryString=<%= request.getQueryString() %>
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/web/Include00c.jsp
  
  Index: Include00c.jsp
  ===================================================================
  <%@ page contentType="text/plain" %>Include00c PASSED
  requestURI=<%= request.getRequestURI() %>
  contextPath=<%= request.getContextPath() %>
  servletPath=<%= request.getServletPath() %>
  pathInfo=<%= request.getPathInfo() %>
  queryString=<%= request.getQueryString() %>
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/web/Include00e.jsp
  
  Index: Include00e.jsp
  ===================================================================
  <%@ page contentType="text/plain" %>Include00e PASSED
  requestURI=<%= request.getRequestURI() %>
  contextPath=<%= request.getContextPath() %>
  servletPath=<%= request.getServletPath() %>
  pathInfo=<%= request.getPathInfo() %>
  queryString=<%= request.getQueryString() %>
  
  
  
  1.29      +100 -0    jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/tester/web/WEB-INF/web.xml,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- web.xml	2001/05/03 18:41:45	1.28
  +++ web.xml	2001/05/03 23:06:35	1.29
  @@ -104,6 +104,11 @@
   
       <filter-mapping>
           <filter-name>HttpFilter</filter-name>
  +        <url-pattern>/WrappedForward00</url-pattern>
  +    </filter-mapping>
  +
  +    <filter-mapping>
  +        <filter-name>HttpFilter</filter-name>
           <url-pattern>/WrappedForward01</url-pattern>
       </filter-mapping>
   
  @@ -144,6 +149,11 @@
   
       <filter-mapping>
           <filter-name>HttpFilter</filter-name>
  +        <url-pattern>/WrappedInclude00</url-pattern>
  +    </filter-mapping>
  +
  +    <filter-mapping>
  +        <filter-name>HttpFilter</filter-name>
           <url-pattern>/WrappedInclude01</url-pattern>
       </filter-mapping>
   
  @@ -343,6 +353,31 @@
       </servlet>
   
       <servlet>
  +        <servlet-name>Forward00</servlet-name>
  +        <servlet-class>org.apache.tester.Forward00</servlet-class>
  +    </servlet>
  +
  +    <servlet>
  +        <servlet-name>Forward00a</servlet-name>
  +        <servlet-class>org.apache.tester.Forward00a</servlet-class>
  +    </servlet>
  +
  +    <servlet>
  +        <servlet-name>Forward00b</servlet-name>
  +        <jsp-file>/Forward00b.jsp</jsp-file>
  +    </servlet>
  +
  +    <servlet>
  +        <servlet-name>Forward00d</servlet-name>
  +        <servlet-class>org.apache.tester.Forward00d</servlet-class>
  +    </servlet>
  +
  +    <servlet>
  +        <servlet-name>Forward00e</servlet-name>
  +        <jsp-file>/Forward00e.jsp</jsp-file>
  +    </servlet>
  +
  +    <servlet>
           <servlet-name>Forward01</servlet-name>
           <servlet-class>org.apache.tester.Forward01</servlet-class>
       </servlet>
  @@ -388,6 +423,31 @@
       </servlet>
   
       <servlet>
  +        <servlet-name>Include00</servlet-name>
  +        <servlet-class>org.apache.tester.Include00</servlet-class>
  +    </servlet>
  +
  +    <servlet>
  +        <servlet-name>Include00a</servlet-name>
  +        <servlet-class>org.apache.tester.Include00a</servlet-class>
  +    </servlet>
  +
  +    <servlet>
  +        <servlet-name>Include00b</servlet-name>
  +        <jsp-file>/Include00b.jsp</jsp-file>
  +    </servlet>
  +
  +    <servlet>
  +        <servlet-name>Include00d</servlet-name>
  +        <servlet-class>org.apache.tester.Include00d</servlet-class>
  +    </servlet>
  +
  +    <servlet>
  +        <servlet-name>Include00e</servlet-name>
  +        <jsp-file>/Include00e.jsp</jsp-file>
  +    </servlet>
  +
  +    <servlet>
           <servlet-name>Include01</servlet-name>
           <servlet-class>org.apache.tester.Include01</servlet-class>
       </servlet>
  @@ -632,6 +692,26 @@
       </servlet-mapping>
   
       <servlet-mapping>
  +        <servlet-name>Forward00</servlet-name>
  +        <url-pattern>/Forward00</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>Forward00</servlet-name>
  +        <url-pattern>/WrappedForward00</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>Forward00a</servlet-name>
  +        <url-pattern>/Forward00a</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>Forward00b</servlet-name>
  +        <url-pattern>/Forward00b</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
           <servlet-name>Forward01</servlet-name>
           <url-pattern>/Forward01</url-pattern>
       </servlet-mapping>
  @@ -719,6 +799,26 @@
       <servlet-mapping>
           <servlet-name>Golden01</servlet-name>
           <url-pattern>/WrappedGolden01</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>Include00</servlet-name>
  +        <url-pattern>/Include00</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>Include00</servlet-name>
  +        <url-pattern>/WrappedInclude00</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>Include00a</servlet-name>
  +        <url-pattern>/Include00a</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>Include00b</servlet-name>
  +        <url-pattern>/Include00b</url-pattern>
       </servlet-mapping>
   
       <servlet-mapping>
  
  
  

Mime
View raw message