vmassol     01/09/16 04:17:56

  Modified:    build    build-servletapi.xml
               conf/sample/conf/test/servlet22 web.xml
               conf/sample/conf/test/servlet23 cactus.properties web.xml
               docs/framework/xdocs howto_config.xml howto_ide_vajava.xml
               src/framework/servlet23/org/apache/cactus/server
                        FilterTestRedirector.java
               src/framework/share/org/apache/cactus/server
                        JspTestRedirector.java
  Added:       web      jspRedirector.jsp
  Removed:     web      redirector.jsp
  Log:
  * renamed redirector.jsp in jspRedirector.jsp
  * corrected mapping for FilterRedirector (some servlet engine - ex: Orion 1.5.2) 
will not accept a mapping to itself and need a mapping to a jsp for example - although 
the jsp do not need to be supplied).
  * some Servlet 2.3 API servlet engine are still using getFilterConfig() and 
setFilterConfig() for filters (ex: Orion 1.5.2). Added these methods for backward 
compatibility.
  * This leads to fully supporting Orion 1.5.2 now !
  
  Revision  Changes    Path
  1.26      +1 -1      jakarta-cactus/build/build-servletapi.xml
  
  Index: build-servletapi.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/build/build-servletapi.xml,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- build-servletapi.xml      2001/09/15 12:40:41     1.25
  +++ build-servletapi.xml      2001/09/16 11:17:56     1.26
  @@ -514,7 +514,7 @@
           </copy>
   
           <!-- Copy web files -->
  -        <copy file="${web.dir}/redirector.jsp" 
tofile="${out.sample.web.dir}/test/redirector.jsp"/>
  +        <copy file="${web.dir}/jspRedirector.jsp" 
tofile="${out.sample.web.dir}/test/jspRedirector.jsp"/>
           <copy todir="${out.sample.web.dir}">
               <fileset dir="${sample.web.dir}"/>
           </copy>
  
  
  
  1.3       +1 -1      jakarta-cactus/conf/sample/conf/test/servlet22/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/conf/sample/conf/test/servlet22/web.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- web.xml   2001/09/15 12:40:42     1.2
  +++ web.xml   2001/09/16 11:17:56     1.3
  @@ -17,7 +17,7 @@
   
       <servlet>
           <servlet-name>JspRedirector</servlet-name>
  -        <jsp-file>/test/redirector.jsp</jsp-file>
  +        <jsp-file>/test/jspRedirector.jsp</jsp-file>
           <init-param>
             <param-name>param1</param-name>
             <param-value>value1 used for testing</param-value>
  
  
  
  1.2       +9 -1      jakarta-cactus/conf/sample/conf/test/servlet23/cactus.properties
  
  Index: cactus.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/conf/sample/conf/test/servlet23/cactus.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- cactus.properties 2001/09/07 16:09:23     1.1
  +++ cactus.properties 2001/09/16 11:17:56     1.2
  @@ -15,4 +15,12 @@
   cactus.jspRedirectorURL = http://localhost:@test.port@/test/JspRedirector/
   
   # Filter Redirector. Used by FilterTestCase test cases.
  -cactus.filterRedirectorURL = http://localhost:@test.port@/test/FilterRedirector/
  +
  +# NOTE: Some servlet 2.3 containers need to map the filter to a valid
  +# resource (Orion 1.5.2 for example). Others, like Tomcat, are happy
  +# with just any mapping.
  +#
  +# For example, the following would work with Tomcat :
  +# cactus.filterRedirectorURL = http://localhost:@test.port@/test/FilterRedirector
  +
  +cactus.filterRedirectorURL = 
http://localhost:@test.port@/test/test/filterRedirector.jsp
  
  
  
  1.3       +9 -2      jakarta-cactus/conf/sample/conf/test/servlet23/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/conf/sample/conf/test/servlet23/web.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- web.xml   2001/09/15 12:40:42     1.2
  +++ web.xml   2001/09/16 11:17:56     1.3
  @@ -13,7 +13,14 @@
   
       <filter-mapping>
           <filter-name>FilterRedirector</filter-name>
  -        <url-pattern>/FilterRedirector/</url-pattern>
  +
  +        <!-- Some servlet 2.3 containers need to map the filter to a valid
  +             resource (Orion 1.5.2 for example). Others, like Tomcat,
  +             are happy with just any mapping.
  +
  +             For example, the following would work with Tomcat :
  +             <url-pattern>/FilterRedirector/</url-pattern> -->
  +        <url-pattern>/test/filterRedirector.jsp</url-pattern>
       </filter-mapping>
   
       <servlet>
  @@ -27,7 +34,7 @@
   
       <servlet>
           <servlet-name>JspRedirector</servlet-name>
  -        <jsp-file>/test/redirector.jsp</jsp-file>
  +        <jsp-file>/test/jspRedirector.jsp</jsp-file>
           <init-param>
             <param-name>param1</param-name>
             <param-value>value1 used for testing</param-value>
  
  
  
  1.5       +3 -3      jakarta-cactus/docs/framework/xdocs/howto_config.xml
  
  Index: howto_config.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/docs/framework/xdocs/howto_config.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- howto_config.xml  2001/09/15 12:40:42     1.4
  +++ howto_config.xml  2001/09/16 11:17:56     1.5
  @@ -305,7 +305,7 @@
       <!-- JSP Redirector URL configuration -->
       <servlet>
           <servlet-name>JspRedirector</servlet-name>
  -        <jsp-file>/somewhere/redirector.jsp</jsp-file>
  +        <jsp-file>/somewhere/jspRedirector.jsp</jsp-file>
       </servlet>
   
       <!-- Servlet Redirector URL mapping -->
  @@ -335,7 +335,7 @@
             <note>
               If you are using the JSP Redirector (i.e. you have test classes
               that extend <code>JspTestCase</code>), you <strong>must</strong>
  -            copy the <code>redirector.jsp</code> file (found in the
  +            copy the <code>jspRedirector.jsp</code> file (found in the
               <code>sample/web/test</code> directory where you unpacked your
               Cactus distribution) anywhere in your webapp and you need to
               out it's relative path in the mapping defined above (here we
  @@ -350,7 +350,7 @@
               mapping in <code>web.xml</code> for the JSP Redirector and use
               the following URL in your <code>cactus.properties</code> :
               <code>cactus.jspRedirectorURL =
  -            http://localhost:8080/test/somewhere/redirector.jsp</code>
  +            http://localhost:8080/test/somewhere/jspRedirector.jsp</code>
             </note>
   
             <p>
  
  
  
  1.3       +2 -2      jakarta-cactus/docs/framework/xdocs/howto_ide_vajava.xml
  
  Index: howto_ide_vajava.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/docs/framework/xdocs/howto_ide_vajava.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- howto_ide_vajava.xml      2001/09/15 12:40:42     1.2
  +++ howto_ide_vajava.xml      2001/09/16 11:17:56     1.3
  @@ -90,7 +90,7 @@
           <code>cactus.properties</code>, you should simply
           put the JSP file name, as in
           "<code>cactus.jspRedirectorURL =
  -        http://localhost:8080/test/redirector.jsp</code>". This is only needed
  +        http://localhost:8080/test/jspRedirector.jsp</code>". This is only needed
           if you have test cases that extend <code>JspTestCase</code>.
         </note>
   
  @@ -231,7 +231,7 @@
         <s2 title="Copy the Cactus JSP Redirector file">
   
           <p>
  -          Copy the <code>{Cactus dir}/sample/web/test/redirector.jsp</code>
  +          Copy the <code>{Cactus dir}/sample/web/test/jspRedirector.jsp</code>
             file to <code>{WTE dir}/hosts/default_host/test/web</code>.
           </p>
   
  
  
  
  1.3       +19 -1     
jakarta-cactus/src/framework/servlet23/org/apache/cactus/server/FilterTestRedirector.java
  
  Index: FilterTestRedirector.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/framework/servlet23/org/apache/cactus/server/FilterTestRedirector.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FilterTestRedirector.java 2001/09/14 20:13:21     1.2
  +++ FilterTestRedirector.java 2001/09/16 11:17:56     1.3
  @@ -66,7 +66,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: FilterTestRedirector.java,v 1.2 2001/09/14 20:13:21 pier Exp $
  + * @version $Id: FilterTestRedirector.java,v 1.3 2001/09/16 11:17:56 vmassol Exp $
    * @see FilterTestCaller
    */
   public class FilterTestRedirector implements Filter
  @@ -131,6 +131,24 @@
       {
           // Save the config to pass it to the test case later on
           this.config = theConfig;
  +    }
  +
  +    /**
  +     * Provided so that it works with containers that do not support the
  +     * latest Filter spec yet ! (ex: Orion 1.5.2 !)
  +     */
  +    public void setFilterConfig(FilterConfig theConfig)
  +    {
  +        this.config = theConfig;
  +    }
  +
  +    /**
  +     * Provided so that it works with containers that do not support the
  +     * latest Filter spec yet ! (ex: Orion 1.5.2 !)
  +     */
  +    public FilterConfig getFilterConfig()
  +    {
  +        return this.config;
       }
   
       /**
  
  
  
  1.6       +4 -4      
jakarta-cactus/src/framework/share/org/apache/cactus/server/JspTestRedirector.java
  
  Index: JspTestRedirector.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/src/framework/share/org/apache/cactus/server/JspTestRedirector.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JspTestRedirector.java    2001/09/14 20:17:51     1.5
  +++ JspTestRedirector.java    2001/09/16 11:17:56     1.6
  @@ -60,13 +60,13 @@
   import org.apache.cactus.util.log.*;
   
   /**
  - * Extension of the <code>redirector.jsp</code> JSP Redirector in the java
  + * Extension of the <code>jspRedirector.jsp</code> JSP Redirector in the java
    * realmn in order to provide a symmetry with the <code>ServletRedirector</code>
  - * and minimize the amount of java code in <code>redirector.jsp</code>.
  + * and minimize the amount of java code in <code>jspRedirector.jsp</code>.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Massol</a>
    *
  - * @version $Id: JspTestRedirector.java,v 1.5 2001/09/14 20:17:51 pier Exp $
  + * @version $Id: JspTestRedirector.java,v 1.6 2001/09/16 11:17:56 vmassol Exp $
    */
   public class JspTestRedirector
   {
  @@ -86,7 +86,7 @@
           LogService.getInstance().getLog(JspTestRedirector.class.getName());
   
       /**
  -     * Handles requests from the <code>redirector.jsp</code> JSP Redirector.
  +     * Handles requests from the <code>jspRedirector.jsp</code> JSP Redirector.
        * @param theObjects the implicit objects that will be passed to the test
        *        case
        */
  
  
  
  1.1                  jakarta-cactus/web/jspRedirector.jsp
  
  Index: jspRedirector.jsp
  ===================================================================
  <%@page import="org.apache.cactus.server.*" session="false" %><%
  
      /**                                                
       *                                                 
       * Note:                                           
       * It is very important not to put any character between the end
       * of the page tag and the beginning of the java code expression, otherwise,
       * the generated servlet containss a 'out.println("\r\n");' and this breaks
       * our mechanism !
       */
  
      /**
       * This JSP is used as a proxy to call your server-side unit tests. We use
       * a JSP rather than a servlet because for testing custom JSP tags for
       * example we need access to JSP implicit objects (PageContext and
       * JspWriter).
       */
  
      JspImplicitObjects objects = new JspImplicitObjects();
      objects.setHttpServletRequest(request);
      objects.setHttpServletResponse(response);
      objects.setServletConfig(config);
      objects.setServletContext(application);
      objects.setJspWriter(out);
      objects.setPageContext(pageContext);
  
      JspTestRedirector redirector = new JspTestRedirector();
      redirector.doGet(objects);
  %>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to