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 Tue, 29 May 2001 17:55:40 GMT
craigmcc    01/05/29 10:55:40

  Modified:    tester/src/bin tester.xml
               tester/web/WEB-INF web.xml
  Added:       tester/web ErrorPage09.jsp ErrorPage10.jsp
  Log:
  Additional tests for JSP "errorPage" declarations.
  
  Revision  Changes    Path
  1.46      +15 -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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- tester.xml	2001/05/12 04:58:27	1.45
  +++ tester.xml	2001/05/29 17:55:31	1.46
  @@ -329,6 +329,21 @@
             status="200"
         outContent="ErrorPage06 PASSED - HTML"/>
   
  +    <!-- ========== Exception Mapping (JSP Error Page) ==================== -->
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/ErrorPage09"
  +           debug="${debug}"
  +          status="200"
  +      outContent="ErrorPage10 PASSED"/>
  +
  +    <tester host="${host}" port="${port}" protocol="${protocol}"
  +         request="${context.path}/WrappedErrorPage09"
  +           debug="${debug}"
  +          status="200"
  +      outContent="ErrorPage10 PASSED"/>
  +
  +
     </target>
   
   
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/web/ErrorPage09.jsp
  
  Index: ErrorPage09.jsp
  ===================================================================
  <%@ page contentType="text/plain" errorPage="/ErrorPage10.jsp" %><%
  
          // Write a FAILED message that should get replaced by the error text
          out.println("ErrorPage09 FAILED - Original response returned");
  
          // Throw the specified exception
          int i = 1;
          if (i > 0) {
              throw new ArrayIndexOutOfBoundsException
                  ("ErrorPage09 Threw ArrayIndexOutOfBoundsException");
          }
  
  %>
  
  
  
  1.1                  jakarta-tomcat-4.0/tester/web/ErrorPage10.jsp
  
  Index: ErrorPage10.jsp
  ===================================================================
  <%@ page contentType="text/plain" isErrorPage="true" %><%
  
          // Accumulate all the reasons this request might fail
          StringBuffer sb = new StringBuffer();
          Object value = null;
  
          if (exception == null) {
              sb.append(" exception is missing/");
          } else {
              if (!(exception instanceof java.lang.ArrayIndexOutOfBoundsException)) {
                  sb.append(" exception class is ");
                  sb.append(exception.getClass().getName());
                  sb.append("/");
              }
              if (!"ErrorPage09 Threw ArrayIndexOutOfBoundsException".equals(exception.getMessage()))
{
                  sb.append(" exception message is ");
                  sb.append(exception.getMessage());
                  sb.append("/");
              }
          }
  
          // Report ultimate success or failure
          if (sb.length() < 1)
              out.println("ErrorPage10 PASSED");
          else
              out.println("ErrorPage10 FAILED -" + sb.toString());
  
  %>
  <%
    out.println("EXCEPTION:  " + exception);
  %>
  
  
  
  1.35      +20 -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.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- web.xml	2001/05/12 04:58:27	1.34
  +++ web.xml	2001/05/29 17:55:37	1.35
  @@ -109,6 +109,11 @@
   
       <filter-mapping>
           <filter-name>HttpFilter</filter-name>
  +        <url-pattern>/WrappedErrorPage09</url-pattern>
  +    </filter-mapping>
  +
  +    <filter-mapping>
  +        <filter-name>HttpFilter</filter-name>
           <url-pattern>/WrappedForward00</url-pattern>
       </filter-mapping>
   
  @@ -392,6 +397,11 @@
       </servlet>
   
       <servlet>
  +        <servlet-name>ErrorPage09</servlet-name>
  +        <jsp-file>/ErrorPage09.jsp</jsp-file>
  +    </servlet>
  +
  +    <servlet>
           <servlet-name>Forward00</servlet-name>
           <servlet-class>org.apache.tester.Forward00</servlet-class>
       </servlet>
  @@ -768,6 +778,16 @@
       <servlet-mapping>
           <servlet-name>ErrorPage08</servlet-name>
           <url-pattern>/WrappedErrorPage08</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>ErrorPage09</servlet-name>
  +        <url-pattern>/ErrorPage09</url-pattern>
  +    </servlet-mapping>
  +
  +    <servlet-mapping>
  +        <servlet-name>ErrorPage09</servlet-name>
  +        <url-pattern>/WrappedErrorPage09</url-pattern>
       </servlet-mapping>
   
       <servlet-mapping>
  
  
  

Mime
View raw message