You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2002/06/16 06:02:38 UTC

cvs commit: jakarta-struts/web/test/test redirector.jsp

craigmcc    2002/06/15 21:02:38

  Modified:    .        build-tests.xml build.xml
               conf/test cactus.properties web.xml
               conf/test/tomcat40 server.xml
               src/test/org/apache/struts/taglib/logic
                        TestNotPresentTag.java TestPresentTag.java
               web/test/test redirector.jsp
  Added:       conf/test log_client.properties
               conf/test/tomcat41 server.xml
               web/test jspRedirector.jsp
  Log:
  Bring the test harness for Struts 1.1 up to date with respect to changes
  in both the Struts classes and changes required by switching to Cactus 1.3
  (which is now required).
  
  All test execution is now in build-tests.xml, but there are convenient
  execution triggers in build.xml itself:
  
    test.junit             Execute non-Cactus JUnit tests
    test.tomcat.32         Execute Cactus tests on Tomcat 3.2
    test.tomcat.40         Execute Cactus tests on Tomcat 4.0
    test.tomcat.41         Execute Cactus tests on Tomcat 4.1
    test tomcat.all        Execute Cactus tests on all Tomcats for which
                           you have a "tomcat.home.XX" property defined
  
  NOTE:  You will need to define a couple of new properties to execute tests:
  
    cactus.home           Pathname to install directory for Cactus 1.3
    aspectjrt.jar         AspectJ runtime Jar (usually you can set this to
                          "${cactus.home}/lib/aspectjrt.jar")
    cactus.jar            Cactus JAR file
    cactus.ant.jar        Cactus Ant JAR file
    log4j.jar             Log4J JAR file
  
  In addition, you'll need to follow the Cactus 1.3 installation rules about
  putting the necessary files into your $ANT_HOME/lib directory, or use the
  prepackaged Cactus Ant download that has what you need.
  
  NOTE:  I don't have Tomcat 3.2 installed any more, so I don't know for
  sure if the tests will really pass on it.  They pass on 4.0 and 4.1
  (head of each CVS branch).
  
  NOTE:  On 4.0 and 4.1, Jasper complains a lot about "Stream closed"
  problems, but it doesn't seem to cause the tests to fail.  To get this
  output out of the way, I've put a <Logger> in the server.xml file for
  these two versions, that writes to a file in the
  "target/tests/server/tomcatXX" subdirectory.
  
  NOTE:  Cactus logging is configured to write to "cactus_client.log" and
  "cactus_server.log" in your top level source directory.
  
  Now it's time to write a whole bunch of unit tests ...
  
  Revision  Changes    Path
  1.3       +161 -11   jakarta-struts/build-tests.xml
  
  Index: build-tests.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/build-tests.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build-tests.xml	11 Jul 2001 01:57:44 -0000	1.2
  +++ build-tests.xml	16 Jun 2002 04:02:38 -0000	1.3
  @@ -20,8 +20,14 @@
   
           servlet.jar                   The servlet jar (either 2.2 or 2.3)
   
  +        cactus.home                   The home directory of your Cactus
  +                                      installation (version 1.3 required)
  +
  +        aspectjrt.jar                 The AspectJ runtime jar that is
  +                                      included with Cactus 1.3
  +
           cactus.jar                    The Cactus jar (either for Servlet API
  -                                      2.2 or 2.3)
  +                                      2.2 or 2.3).
   
           cactus.ant.jar                The Cactus custom Ant tasks jar
   
  @@ -33,6 +39,9 @@
           tomcat.home.40                The home directory of where Tomcat 4.0
                                         is installed
   
  +        tomcat.home.41                The home directory of where Tomcat 4.1
  +                                      is installed
  +
           compile.debug                 The debug mode for compilation
   
           compile.deprecation           The deprecation mode for compilation
  @@ -75,9 +84,20 @@
       <!-- Compilation Classpath -->
       <path id="compile.classpath">
         <pathelement location="${build.home}/library/${app.name}.jar"/>
  -      <pathelement location="${servlet.jar}"/>
  +      <pathelement location="${build.home}/test/classes"/>
  +      <pathelement location="${commons-beanutils.jar}"/>
  +      <pathelement location="${commons-collections.jar}"/>
  +      <pathelement location="${commons-dbcp.jar}"/>
  +      <pathelement location="${commons-digester.jar}"/>
  +      <pathelement location="${commons-httpclient.jar}"/>
  +      <pathelement location="${commons-logging.jar}"/>
  +      <pathelement location="${commons-pool.jar}"/>
  +      <pathelement location="${commons-services.jar}"/>
  +      <pathelement location="${commons-validator.jar}"/>
  +      <pathelement location="${aspectjrt.jar}"/>
         <pathelement location="${cactus.jar}"/>
         <pathelement location="${junit.jar}"/>
  +      <pathelement location="${servlet.jar}"/>
       </path>
   
   <!-- ========== Executable Targets ======================================== -->
  @@ -89,7 +109,7 @@
       <target name="init">
   
           <taskdef name="runservertests"
  -            classname="org.apache.commons.cactus.ant.RunServerTestsTask">
  +            classname="org.apache.cactus.ant.RunServerTestsTask">
   
               <classpath>
                   <pathelement location="${cactus.ant.jar}"/>
  @@ -130,7 +150,10 @@
               <classpath refid="compile.classpath"/>
           </javac>
           <copy todir="${out.test.dir}/classes">
  -            <fileset dir="${src.test.dir}" includes="**/*.properties"/>
  +            <fileset dir="${src.test.dir}" excludes="**/*.java"/>
  +        </copy>
  +        <copy todir="${out.test.dir}/classes">
  +            <fileset dir="${conf.test.dir}" includes="**/*.properties"/>
           </copy>
   
       </target>
  @@ -138,13 +161,31 @@
   <!--
           Prepare test war (for all servlet engines)
   -->
  -    <target name="prepare.test.war" depends="compile.test" if="tomcat.home.32">
  +    <target name="prepare.test.war" depends="compile.test">
   
           <!-- Copy needed libs in /lib -->
           <copy file="${build.home}/library/${app.name}.jar"
               todir="${out.test.dir}/lib"/>
  -        <copy file="${junit.jar}" todir="${out.test.dir}/lib"/>
  -        <copy file="${cactus.jar}" todir="${out.test.dir}/lib"/>
  +        <copy file="${aspectjrt.jar}" todir="${out.test.dir}/lib"/>
  +        <copy file="${junit.jar}"     todir="${out.test.dir}/lib"/>
  +        <copy file="${log4j.jar}"     todir="${out.test.dir}/lib"/>
  +        <copy file="${cactus.jar}"    todir="${out.test.dir}/lib"/>
  +        <copy file="${commons-beanutils.jar}"
  +                                      todir="${out.test.dir}/lib"/>
  +        <copy file="${commons-collections.jar}"
  +                                      todir="${out.test.dir}/lib"/>
  +        <copy file="${commons-dbcp.jar}"
  +                                      todir="${out.test.dir}/lib"/>
  +        <copy file="${commons-digester.jar}"
  +                                      todir="${out.test.dir}/lib"/>
  +        <copy file="${commons-logging.jar}"
  +                                      todir="${out.test.dir}/lib"/>
  +        <copy file="${commons-pool.jar}"
  +                                      todir="${out.test.dir}/lib"/>
  +        <copy file="${commons-services.jar}"
  +                                      todir="${out.test.dir}/lib"/>
  +        <copy file="${commons-validator.jar}"
  +                                      todir="${out.test.dir}/lib"/>
   
           <war warfile="${out.test.dir}/test.war"
                webxml="${conf.test.dir}/web.xml">
  @@ -195,6 +236,7 @@
                   <include name="org/apache/struts/taglib/logic/Test*.class" />
                 </fileset>
               </batchtest>
  +
           </junit>
   
       </target>
  @@ -281,7 +323,7 @@
       <target name="prepare.test.tomcat.40" depends="prepare.test.war" if="tomcat.home.40">
   
           <property name="out.tomcat.40.dir" value="${out.test.dir}/servers/tomcat40"/>
  -        <filter token="out.tomcat.40.full.dir" value="${basedir}/${out.tomcat.40.dir}"/>
  +        <filter token="out.tomcat.40.full.dir" value="${out.tomcat.40.dir}"/>
   
           <mkdir dir="${out.tomcat.40.dir}/webapps"/>
           <mkdir dir="${out.tomcat.40.dir}/conf"/>
  @@ -322,14 +364,15 @@
   
           <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
               <jvmarg value="-Dcatalina.home=${tomcat.home.40}"/>
  +            <jvmarg value="-Dcatalina.base=${tomcat.home.40}"/>
               <arg value="-config"/>
  -            <arg value="${basedir}/${out.tomcat.40.dir}/conf/server.xml"/>
  +            <arg value="${out.tomcat.40.dir}/conf/server.xml"/>
               <arg value="start"/>
               <classpath>
                 <pathelement location="${java.home}/../lib/tools.jar"/>
                 <fileset dir="${tomcat.home.40}">
                     <include name="bin/bootstrap.jar"/>
  -                  <include name="server/catalina.jar"/>
  +<!--                  <include name="server/catalina.jar"/> -->
                 </fileset>
               </classpath>
           </java>
  @@ -343,15 +386,122 @@
   
           <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
               <jvmarg value="-Dcatalina.home=${tomcat.home.40}"/>
  +            <jvmarg value="-Dcatalina.base=${tomcat.home.40}"/>
  +            <arg value="-config"/>
  +            <arg value="${out.tomcat.40.dir}/conf/server.xml"/>
               <arg value="stop"/>
               <classpath>
                 <fileset dir="${tomcat.home.40}">
                     <include name="bin/bootstrap.jar"/>
  -                  <include name="server/catalina.jar"/>
  +<!--                  <include name="server/catalina.jar"/> -->
  +              </fileset>
  +            </classpath>
  +        </java>
  +
  +    </target>
  +
  +<!--
  +        Prepare test directory structure for Tomcat 4.1 servlet engine
  +-->
  +    <target name="prepare.test.tomcat.41" depends="prepare.test.war" if="tomcat.home.41">
  +
  +        <property name="out.tomcat.41.dir" value="${out.test.dir}/servers/tomcat41"/>
  +        <filter token="out.tomcat.41.full.dir" value="${out.tomcat.41.dir}"/>
  +
  +        <mkdir dir="${out.tomcat.41.dir}/webapps"/>
  +        <mkdir dir="${out.tomcat.41.dir}/conf"/>
  +
  +	<!-- Delete old directory so new war is unzipped -->
  +        <delete dir="${out.tomcat.41.dir}/webapps/test"/>
  +
  +        <!-- Copy war file -->
  +        <copy file="${out.test.dir}/test.war" todir="${out.tomcat.41.dir}/webapps"/>
  +    
  +        <!-- Copy configuration files -->
  +        <copy file="${conf.test.dir}/tomcat41/server.xml"
  +            todir="${out.tomcat.41.dir}/conf" filtering="on"/>
  +
  +    </target>
  +
  +<!--
  +        Run unit tests on Tomcat 4.1 servlet engine
  +-->
  +    <target name="test.tomcat.41" depends="prepare.test.tomcat.41">
  +
  +        <!-- Start the servlet engine, wait for it to be started, run the
  +             unit tests, stop the servlet engine, wait for it to be stopped.
  +             The servlet engine is automatically stopped if the tests fail for
  +             any reason.-->
  +
  +        <runservertests testURL="http://localhost:8080/test"
  +            startTarget="start.tomcat.41"
  +            stopTarget="stop.tomcat.41"
  +            testTarget="run.test"/>
  +
  +    </target>
  +
  +<!--
  +        Start Tomcat 4.1 servlet engine
  +-->
  +    <target name="start.tomcat.41">
  +
  +        <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
  +            <jvmarg value="-Dcatalina.home=${tomcat.home.41}"/>
  +            <jvmarg value="-Dcatalina.base=${tomcat.home.41}"/>
  +            <arg value="-config"/>
  +            <arg value="${out.tomcat.41.dir}/conf/server.xml"/>
  +            <arg value="start"/>
  +            <classpath>
  +              <pathelement location="${java.home}/../lib/tools.jar"/>
  +              <fileset dir="${tomcat.home.41}">
  +                  <include name="bin/bootstrap.jar"/>
  +<!--                  <include name="server/catalina.jar"/> -->
  +              </fileset>
  +            </classpath>
  +        </java>
  +
  +    </target>
  +
  +<!--
  +        Stop Tomcat 4.1 servlet engine
  +-->
  +    <target name="stop.tomcat.41">
  +
  +        <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
  +            <jvmarg value="-Dcatalina.home=${tomcat.home.41}"/>
  +            <jvmarg value="-Dcatalina.base=${tomcat.home.41}"/>
  +            <arg value="-config"/>
  +            <arg value="${out.tomcat.41.dir}/conf/server.xml"/>
  +            <arg value="stop"/>
  +            <classpath>
  +              <fileset dir="${tomcat.home.41}">
  +                  <include name="bin/bootstrap.jar"/>
  +<!--                  <include name="server/catalina.jar"/> -->
                 </fileset>
               </classpath>
           </java>
   
       </target>
  +
  +
  +<!-- ================ Non-Cactus JUnit Based Tests ======================== -->
  +
  +
  +    <target name="test.junit" depends="compile.test"
  +     description="Run all non-Cactus based JUnit tests">
  +
  +      <junit printsummary="yes" haltonfailure="no" haltonerror="no" fork="yes">
  +
  +        <!-- JUnit Configuration Options -->
  +        <classpath refid="compile.classpath"/>
  +        <formatter  type="plain" usefile="false"/>
  +
  +        <!-- Initiate test executions -->
  +        <test       name="org.apache.struts.config.TestApplicationConfig"/>
  +
  +      </junit>
  +
  +    </target>
  +
   
   </project>
  
  
  
  1.70      +39 -111   jakarta-struts/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/build.xml,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- build.xml	16 Jun 2002 00:37:12 -0000	1.69
  +++ build.xml	16 Jun 2002 04:02:38 -0000	1.70
  @@ -72,8 +72,6 @@
           jdbc20ext.jar                 (required).  The path to the JAR file
                                         for the JDBC 2.0 Optional Package APIs.
   
  -        junit.jar                     (optional) JUnit for "test".
  -
           servlet.jar                   (required).  The path to the Servlet API
                                         classes to compile against (currently,
                                         either version 2.2 or 2.3 supported).
  @@ -211,38 +209,6 @@
       </path>
   
   
  -<!-- ========== Test Execution Defaults =================================== -->
  -
  -
  -  <!-- Construct unit test classpath -->
  -  <path id="test.classpath">
  -    <pathelement location="${build.home}/library/classes"/>
  -    <pathelement location="${build.home}/test/classes"/>
  -    <pathelement location="${commons-beanutils.jar}"/>
  -    <pathelement location="${commons-collections.jar}"/>
  -    <pathelement location="${commons-dbcp.jar}"/>
  -    <pathelement location="${commons-digester.jar}"/>
  -    <pathelement location="${commons-logging.jar}"/>
  -    <pathelement location="${commons-pool.jar}"/>
  -    <pathelement location="${commons-services.jar}"/>
  -    <pathelement location="${commons-validator.jar}"/>
  -    <pathelement location="${jakarta-oro.jar}"/>
  -    <pathelement location="${jdbc20ext.jar}"/>
  -    <pathelement location="${servlet.jar}"/>
  -    <pathelement location="${xerces.jar}"/>
  -    <fileset dir="${cactus.home}/lib">
  -      <exclude name="log4j*.jar"/>
  -      <include name="*.jar"/>
  -    </fileset>
  -  </path>
  -
  -  <!-- Should all tests fail if one does? -->
  -  <property name="test.failonerror"        value="true"/>
  -
  -  <!-- The test runner to execute -->
  -  <property name="test.runner"             value="junit.textui.TestRunner"/>
  -
  -
   <!-- ========== Executable Targets ======================================== -->
   
   
  @@ -649,109 +615,71 @@
   <!--
           Run tests on all servers not commented out in the build.properties file.
   -->
  -    <target name="test.all" depends="test.tomcat.32,test.tomcat.40"
  -     description="Run unit tests on all servlet engines">
  +
  +    <!-- =================== Cactus-Based Tests on Tomcat ================= -->
  +
  +
  +    <target name="test.tomcat.all"
  +         depends="skip.tomcat.32,test.tomcat.32,
  +                  skip.tomcat.40,test.tomcat.40,
  +                  skip.tomcat.41,test.tomcat.41"
  +     description="Run Cactus-based unit tests on all servlet engines">
       </target>
   
  -<!-- 
  -        Display a warning message if the needed servlet engine home property
  -        is not set (for Tomcat 3.2)
  --->
  -    <target name="check.tests.tomcat.32" depends="compile.library" unless="tomcat.home.32">
   
  -        <echo message=""/>
  -        <echo message="*********************************************************"/>
  -        <echo message="WARNING : The 'tomcat.home.32' property has not been set."/>
  +    <target name="skip.tomcat.32" unless="tomcat.home.32">
  +        <echo message="*****************************************************"/>
  +        <echo message="WARNING : Property 'tomcat.home.32' has not been set."/>
           <echo message="          No test will be run on that servlet engine."/>
  -        <echo message="*********************************************************"/>
  +        <echo message="*****************************************************"/>
           <echo message=""/>
  -
       </target>
   
  -<!--
  -        Run the Struts unit tests in the Tomcat 3.2 servlet engine
  --->
  -    <target name="test.tomcat.32" depends="check.tests.tomcat.32,compile.library"
  -     if="tomcat.home.32" description="Run unit tests on Tomcat 3.2">
  -
  +    <target name="test.tomcat.32" if="tomcat.home.32"
  +         depends="skip.tomcat.32,compile.library"
  +     description="Run Cactus-based unit tests on Tomcat 3.2">
           <echo message="tomcat.home.32 = ${tomcat.home.32}"/>
           <ant antfile="build-tests.xml" target="test.tomcat.32"/>
  -    
       </target>
   
  -<!-- 
  -        Display a warning message if the needed servlet engine home property
  -        is not set (for Tomcat 4)
  --->
  -    <target name="check.tests.tomcat.40" depends="compile.library" unless="tomcat.home.40">
   
  -        <echo message=""/>
  -        <echo message="*********************************************************"/>
  -        <echo message="WARNING : The 'tomcat.home.40' property has not been set."/>
  +    <target name="skip.tomcat.40" unless="tomcat.home.40">
  +        <echo message="*****************************************************"/>
  +        <echo message="WARNING : Property 'tomcat.home.40' has not been set."/>
           <echo message="          No test will be run on that servlet engine."/>
  -        <echo message="*********************************************************"/>
  +        <echo message="*****************************************************"/>
           <echo message=""/>
  -
       </target>
   
  -<!--
  -        Run the Struts unit tests in the Tomcat 4.0 servlet engine
  --->    
  -    <target name="test.tomcat.40" depends="check.tests.tomcat.40,compile.library"
  -     if="tomcat.home.40" description="Run unit tests on Tomcat 4.0">
  -
  +    <target name="test.tomcat.40" if="tomcat.home.40"
  +         depends="skip.tomcat.40,compile.library"
  +     description="Run Cactus-based unit tests on Tomcat 4.0">
           <echo message="tomcat.home.40 = ${tomcat.home.40}"/>        
           <ant antfile="build-tests.xml" target="test.tomcat.40"/>
  -    
       </target>
   
   
  -    <!-- ========== Non-Cactus Unit Tests ================================= -->
  -
  -    <target name="test" depends="test.compile,
  -                                 test.action,
  -                                 test.config"
  -     description="Run all non-Cactus based unit tests">
  -    </target>
  -
  -    <target name="test.compile">
  -      <mkdir    dir="${build.home}/test/classes"/>
  -      <javac srcdir="${src.test.dir}"
  -            destdir="${build.home}/test/classes"
  -              debug="${compile.debug}"
  -           optimize="${compile.optimize}"
  -        deprecation="${compile.deprecation}">
  -       <classpath refid="test.classpath"/>
  -      </javac>
  -      <copy   todir="${build.home}/test/classes">
  -        <fileset dir="${src.test.dir}" excludes="**/*.java"/>
  -      </copy>
  -      <copy   todir="${build.home}/test/classes">
  -        <fileset dir="${conf.test.dir}" includes="cactus.properties"/>
  -      </copy>
  +    <target name="skip.tomcat.41" unless="tomcat.home.41">
  +        <echo message="*****************************************************"/>
  +        <echo message="WARNING : Property 'tomcat.home.41' has not been set."/>
  +        <echo message="          No test will be run on that servlet engine."/>
  +        <echo message="*****************************************************"/>
  +        <echo message=""/>
       </target>
   
  -
  -    <target name="test.action">
  -      <echo message="Running Action Package tests ..."/>
  -      <echo message="^^^^ Disabled due to Cactus-reported errors for now"/>
  -<!--
  -      <java classname="${test.runner}" fork="yes"
  -          failonerror="${test.failonerror}">
  -        <arg value="org.apache.struts.action.TestActionServlet"/>
  -        <classpath refid="test.classpath"/>
  -      </java>
  --->
  +    <target name="test.tomcat.41" if="tomcat.home.41"
  +         depends="skip.tomcat.41,compile.library"
  +     description="Run unit tests on Tomcat 4.1">
  +        <echo message="tomcat.home.41 = ${tomcat.home.41}"/>        
  +        <ant antfile="build-tests.xml" target="test.tomcat.41"/>
       </target>
   
   
  -    <target name="test.config">
  -      <echo message="Running Config Package tests ..."/>
  -      <java classname="${test.runner}" fork="yes"
  -          failonerror="${test.failonerror}">
  -        <arg value="org.apache.struts.config.TestApplicationConfig"/>
  -        <classpath refid="test.classpath"/>
  -      </java>
  +    <!-- ========== Non-Cactus Unit Tests ================================= -->
  +
  +    <target name="test.junit" depends="compile.library"
  +     description="Run non-Cactus JUnit tests">
  +      <ant antfile="build-tests.xml" target="test.junit"/>
       </target>
   
   
  
  
  
  1.3       +2 -2      jakarta-struts/conf/test/cactus.properties
  
  Index: cactus.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/conf/test/cactus.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- cactus.properties	16 Jun 2002 00:37:12 -0000	1.2
  +++ cactus.properties	16 Jun 2002 04:02:38 -0000	1.3
  @@ -1,7 +1,7 @@
  -# Configuration file for Cactus Testing of Struts 1.1
  +# Configuration file for Cactus Testing for Struts 1.1
   
   cactus.contextURL = http://localhost:8080/test
  -cactus.enableLogging = false
  +cactus.enableLogging = true
   cactus.filterRedirectorName = FilterRedirector
   cactus.jspRedirectorName = JspRedirector
   cactus.servletRedirectorName = ServletRedirector
  
  
  
  1.3       +18 -6     jakarta-struts/conf/test/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/conf/test/web.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- web.xml	11 Jul 2001 02:04:47 -0000	1.2
  +++ web.xml	16 Jun 2002 04:02:38 -0000	1.3
  @@ -6,18 +6,30 @@
   
   <web-app>
   
  +<!--
  +    <filter>
  +        <filter-name>FilterRedirectory</filter-name>
  +        <filter-class>
  +            org.apache.cactus.server.FilterTestRedirector
  +        </filter-class>
  +    </filter>
  +
  +    <filter-mapping>
  +        <filter-name>FilterRedirector</filter-name>
  +        <url-pattern>/FilterRedirector</url-pattern>
  +    </filter-mapping>
  +-->
  +
       <servlet>
           <servlet-name>ServletRedirector</servlet-name>
  -        <servlet-class>org.apache.commons.cactus.server.ServletTestRedirector</servlet-class>
  +        <servlet-class>
  +            org.apache.cactus.server.ServletTestRedirector
  +        </servlet-class>
       </servlet>
   
       <servlet>
           <servlet-name>JspRedirector</servlet-name>
  -        <jsp-file>/test/redirector.jsp</jsp-file>
  -        <init-param>
  -          <param-name>param1</param-name>
  -          <param-value>value1 used for testing</param-value>
  -        </init-param>
  +        <jsp-file>/jspRedirector.jsp</jsp-file>
       </servlet>
       
       <servlet-mapping>
  
  
  
  1.1                  jakarta-struts/conf/test/log_client.properties
  
  Index: log_client.properties
  ===================================================================
  # Configuration file for Cactus Logging for Struts 1.1 (Client Side)
  
  log4j.appender.cactus = org.apache.log4j.FileAppender
  log4j.appender.cactus.File = cactus_client.log
  log4j.appender.cactus.Append = false
  log4j.appender.cactus.layout = org.apache.log4j.PatternLayout
  log4j.appender.cactus.layout.ConversionPattern = %d(ABSOLUTE) [%t] %-5p %-30.30c(2) %x - %m %n
  log4j.rootCategory=DEBUG, cactus
  log4j.category.org.apache.cactus = WARN, cactus
  log4j.additivity.org.apache.cactus=false
  
  
  
  1.2       +5 -0      jakarta-struts/conf/test/tomcat40/server.xml
  
  Index: server.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/conf/test/tomcat40/server.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- server.xml	6 May 2001 12:07:32 -0000	1.1
  +++ server.xml	16 Jun 2002 04:02:38 -0000	1.2
  @@ -8,6 +8,11 @@
   
       <Engine name="Standalone" defaultHost="localhost" debug="0">
   
  +      <Logger className="org.apache.catalina.logger.FileLogger"
  +              directory="@out.tomcat.40.full.dir@"
  +                 prefix="cactus_test"
  +                 suffix=".log"/>
  +
         <Realm className="org.apache.catalina.realm.MemoryRealm" />
   
         <Host name="localhost" debug="0" appBase="@out.tomcat.40.full.dir@/webapps">
  
  
  
  1.1                  jakarta-struts/conf/test/tomcat41/server.xml
  
  Index: server.xml
  ===================================================================
  <Server port="8005" shutdown="SHUTDOWN" debug="0">
  
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
              debug="0"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
              debug="0"/>
  
    <GlobalNamingResources>
  
      <!-- Editable user database that can also be used by
           UserDatabaseRealm to authenticate users -->
      <Resource name="UserDatabase" auth="Container"
                type="org.apache.catalina.UserDatabase"
         description="User database that can be updated and saved">
      </Resource>
      <ResourceParams name="UserDatabase">
        <parameter>
          <name>factory</name>
          <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
        </parameter>
        <parameter>
          <name>pathname</name>
          <value>conf/tomcat-users.xml</value>
        </parameter>
      </ResourceParams>
  
    </GlobalNamingResources>
  
    <Service name="Tomcat-Standalone">
  
      <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                 port="8080" minProcessors="5" maxProcessors="75"
                 enableLookups="true" redirectPort="8443"
                 acceptCount="10" debug="0" connectionTimeout="20000"
                 useURIValidationHack="false"/>
  
      <Engine name="Standalone" defaultHost="localhost" debug="0">
  
        <Logger className="org.apache.catalina.logger.FileLogger"
                directory="@out.tomcat.41.full.dir@"
                   prefix="cactus_test"
                   suffix=".log"/>
  
        <Realm  className="org.apache.catalina.realm.UserDatabaseRealm"
                    debug="0" resourceName="UserDatabase" />
  
        <Host name="localhost" debug="0" appBase="@out.tomcat.41.full.dir@/webapps">
        </Host>
  
      </Engine>
  
    </Service>
  
  </Server>
  
  
  
  1.4       +3 -3      jakarta-struts/src/test/org/apache/struts/taglib/logic/TestNotPresentTag.java
  
  Index: TestNotPresentTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestNotPresentTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestNotPresentTag.java	26 Dec 2001 21:55:55 -0000	1.3
  +++ TestNotPresentTag.java	16 Jun 2002 04:02:38 -0000	1.4
  @@ -226,7 +226,7 @@
       /**
        * Create cookie for testCookiePresent method test.
       */
  -    public void beginCookiePresent(ServletTestRequest testRequest) {
  +    public void beginCookiePresent(WebRequest testRequest) {
          testRequest.addCookie(COOKIE_KEY, "cookie value");
       }
   
  @@ -257,7 +257,7 @@
       /**
        * Create header for testHeaderPresent method test.
       */
  -    public void beginHeaderPresent(ServletTestRequest testRequest) {
  +    public void beginHeaderPresent(WebRequest testRequest) {
          testRequest.addHeader(HEADER_KEY, "header value");
       }
   
  @@ -288,7 +288,7 @@
       /**
        * Create parameter for testParameterPresent method test.
       */
  -    public void beginParameterPresent(ServletTestRequest testRequest) {
  +    public void beginParameterPresent(WebRequest testRequest) {
          testRequest.addParameter(PARAMETER_KEY, "parameter value");
       }
   
  
  
  
  1.4       +3 -3      jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java
  
  Index: TestPresentTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/test/org/apache/struts/taglib/logic/TestPresentTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestPresentTag.java	26 Dec 2001 21:55:55 -0000	1.3
  +++ TestPresentTag.java	16 Jun 2002 04:02:38 -0000	1.4
  @@ -225,7 +225,7 @@
       /**
        * Create cookie for testCookiePresent method test.
       */
  -    public void beginCookiePresent(ServletTestRequest testRequest) {
  +    public void beginCookiePresent(WebRequest testRequest) {
          testRequest.addCookie(COOKIE_KEY, "cookie value");
       }
   
  @@ -256,7 +256,7 @@
       /**
        * Create header for testHeaderPresent method test.
       */
  -    public void beginHeaderPresent(ServletTestRequest testRequest) {
  +    public void beginHeaderPresent(WebRequest testRequest) {
          testRequest.addHeader(HEADER_KEY, "header value");
       }
   
  @@ -287,7 +287,7 @@
       /**
        * Create parameter for testParameterPresent method test.
       */
  -    public void beginParameterPresent(ServletTestRequest testRequest) {
  +    public void beginParameterPresent(WebRequest testRequest) {
          testRequest.addParameter(PARAMETER_KEY, "parameter value");
       }
   
  
  
  
  1.1                  jakarta-struts/web/test/jspRedirector.jsp
  
  Index: jspRedirector.jsp
  ===================================================================
  <%@page import="org.apache.cactus.server.*,
                  org.apache.cactus.util.log.LogService" session="true" %><%
  
      /**                                                
       *                                                 
       * 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).
       */
  
      /**
       * Initialise logging if not already initialised
       */
      if (!LogService.getInstance().isInitialized())
      {
          LogService.getInstance().init("/log_server.properties");
      }
  
      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);
  %>
  
  
  
  1.2       +2 -2      jakarta-struts/web/test/test/redirector.jsp
  
  Index: redirector.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/test/test/redirector.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- redirector.jsp	11 Jul 2001 01:59:10 -0000	1.1
  +++ redirector.jsp	16 Jun 2002 04:02:38 -0000	1.2
  @@ -1,4 +1,4 @@
  -<%@page import="org.apache.commons.cactus.server.*" session="true" %><%
  +<%@page import="org.apache.cactus.server.*" session="true" %><%
   
       /**                                                
        *                                                 
  @@ -27,4 +27,4 @@
   
       caller.doTest(objects);
   
  -%>
  \ No newline at end of file
  +%>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>