You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2002/03/10 14:58:25 UTC

cvs commit: jakarta-cactus/framework/web jspRedirector.jsp

vmassol     02/03/10 05:58:25

  Modified:    framework build.properties.sample build.xml
               framework/src/java/j2ee13/org/apache/cactus/server
                        FilterImplicitObjects.java
               framework/src/java/share/org/apache/cactus/server
                        AbstractTestCaller.java AbstractTestController.java
                        JspImplicitObjects.java JspTestRedirector.java
                        ServletImplicitObjects.java WebImplicitObjects.java
               framework/web jspRedirector.jsp
  Added:       framework/src/java/share/org/apache/cactus/server
                        AbstractWebImplicitObjects.java
  Removed:     framework LICENSE
  Log:
  second part of build process refactoring
  
  Revision  Changes    Path
  1.2       +6 -6      jakarta-cactus/framework/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/build.properties.sample,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.properties.sample	1 Mar 2002 00:43:45 -0000	1.1
  +++ build.properties.sample	10 Mar 2002 13:58:25 -0000	1.2
  @@ -6,7 +6,7 @@
   # rename this file to "build.properties" in the same directory that contains the
   # "build.xml" file.
   #
  -# $Id: build.properties.sample,v 1.1 2002/03/01 00:43:45 vmassol Exp $
  +# $Id: build.properties.sample,v 1.2 2002/03/10 13:58:25 vmassol Exp $
   # -----------------------------------------------------------------------------
   
   # WARNING:  The relative paths below are relative to the directory where the
  @@ -21,14 +21,14 @@
   # J2EE 1.3 jar, then the Cactus jar will contain the Filter Redirector which is
   # only available for Servlet 2.3 (part of J2EE 1.3).
   
  -j2ee.jar = ../../jakarta-servletapi-4/dist/lib/servlet.jar
  -#j2ee.jar = ../../jakarta-servletapi/dist/lib/servlet.jar
  +j2ee.jar = ../jakarta-servletapi-4/dist/lib/servlet.jar
  +#j2ee.jar = ../jakarta-servletapi/dist/lib/servlet.jar
   
   # The location of the log4j jar
  -log4j.jar = ../../jakarta-log4j/dist/lib/log4j-1.2alpha5.jar
  +log4j.jar = ../jakarta-log4j/dist/lib/log4j-1.2alpha5.jar
   
   # The location of the Commons Httpclient jar
  -commons.httpclient.jar = ../../jakarta-commons/httpclient/dist/commons-httpclient.jar
  +commons.httpclient.jar = ../jakarta-commons/httpclient/dist/commons-httpclient.jar
   
   # The location of the Httpunit jar
  -httpunit.jar = ../../httpunit/lib/httpunit.jar
  \ No newline at end of file
  +httpunit.jar = ../httpunit/lib/httpunit.jar
  \ No newline at end of file
  
  
  
  1.2       +86 -106   jakarta-cactus/framework/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml	1 Mar 2002 00:43:45 -0000	1.1
  +++ build.xml	10 Mar 2002 13:58:25 -0000	1.2
  @@ -14,6 +14,8 @@
   
           ajc/ajdoc              [REQUIRED] AspectJ Ant tasks
   
  +        junit                  [REQUIRED] JUnit Ant task
  +
       The following properties need to be set in either a ./build.properties or
       a ${user.home}/build.properties one or in a calling Ant script :
   
  @@ -38,13 +40,17 @@
   
       Run "ant -projecthelp" to get a list of available targets. The default
       target is "dist"
  +
  +    Note: basedir points to the main Cactus directory in order to have the same
  +          base dir for all Cactus subprojects and thus be able to share
  +          relative paths.
     =============================================================================
   -->
  -<project name="Cactus Framework" default="dist" basedir=".">
  +<project name="Cactus Framework" default="dist" basedir="..">
   
       <!-- Give user a chance to override without editing this file
            (and without typing -D each time it compiles it) -->
  -    <property file="build.properties" />
  +    <property file="framework/build.properties" />
       <property file="${user.home}/build.properties" />
   
       <!-- Global project properties -->
  @@ -68,6 +74,13 @@
   
       <!--
          ========================================================================
  +         Base directory for all file related operations
  +       ========================================================================
  +    -->
  +    <property name="base.dir" value="framework"/>
  +
  +    <!--
  +       ========================================================================
            Set the properties related to the source tree.
            Note: These properties are defined in a target as some need the
                  j2ee.api property to be set
  @@ -76,16 +89,16 @@
       <target name="properties.source">
   
           <!-- Source locations for the build -->
  -        <property name="src.dir" value="src"/>
  +        <property name="src.dir" value="${base.dir}/src"/>
           <property name="src.java.dir" value="${src.dir}/java"/>
           <property name="src.java.share.dir" value="${src.java.dir}/share"/>
           <property name="src.java.specific.dir"
               value="${src.java.dir}/j2ee${j2ee.api}"/>
           <property name="src.test.dir" value="${src.dir}/test"/>
           <property name="src.test.share.dir" value="${src.test.dir}/share"/>
  -        <property name="build.dir" value="."/>
  -        <property name="conf.dir" value="conf"/>
  -        <property name="web.dir" value="web"/>
  +        <property name="build.dir" value="${base.dir}/."/>
  +        <property name="conf.dir" value="${base.dir}/conf"/>
  +        <property name="web.dir" value="${base.dir}/web"/>
   
       </target>
   
  @@ -95,7 +108,7 @@
          ========================================================================
       -->
       <!-- Destination locations for the build -->
  -    <property name="target.dir" value="target"/>
  +    <property name="target.dir" value="${base.dir}/target"/>
       <property name="target.classes.dir" value="${target.dir}/classes"/>
       <property name="target.classes.java.dir"
           value="${target.classes.dir}/java"/>
  @@ -107,29 +120,19 @@
   
       <!-- Distribution directory, i.e. where the expanded distibutable files
            are located -->
  -    <property name="dist.dir" value="dist"/>
  +    <property name="dist.dir" value="${base.dir}/dist"/>
       <property name="dist.lib.dir" value="${dist.dir}/lib"/>
       <property name="dist.doc.dir" value="${dist.dir}/doc"/>
       <property name="dist.doc.api.dir" value="${dist.doc.dir}/api"/>
       <property name="dist.web.dir" value="${dist.dir}/web"/>
   
  -    <!-- Release directory, i.e. where the zipped distribution is located -->
  -    <property name="release.dir" value="release"/>
  -
       <!--
          ========================================================================
           Names of deliverables
  -        Note: These properties are defined in a target as some need the
  -              j2ee.api property to be set
          ========================================================================
       -->
  -    <target name="properties.deliverables">
  -
  -        <!-- The custom task jar and helper classes -->
  -        <property name="framework.jar.name"
  -            value="${project.name.file}-${j2ee.api}"/>
  -
  -    </target>
  +    <!-- The Cactus framework jar -->
  +    <property name="framework.jar.name" value="${project.name.file}"/>
   
       <!--
          ========================================================================
  @@ -150,10 +153,33 @@
   
       <!--
          ========================================================================
  +         Display configurable properties values
  +       ========================================================================
  +    -->
  +    <target name="display.properties">
  +
  +        <echo message="----- ${project.name.text} ${project.version} -----"/>
  +        <echo message=""/>
  +        <echo message="java.class.path = ${java.class.path}"/>
  +        <echo message=""/>
  +        <echo message="java.home = ${java.home}"/>
  +        <echo message="user.home = ${user.home}"/>
  +        <echo message="ant.home = ${ant.home}"/>
  +        <echo message=""/>
  +        <echo message="j2ee.jar = ${j2ee.jar}"/>
  +        <echo message="log4j.jar = ${log4j.jar}"/>
  +        <echo message="commons.httpclient.jar = ${commons.httpclient.jar}"/>
  +        <echo message="httpunit.jar = ${httpunit.jar}"/>
  +        <echo message=""/>
  +
  +    </target>
  +
  +    <!--
  +       ========================================================================
            Verify that all mandatory properties have been set
          ========================================================================
       -->
  -    <target name="check.properties">
  +    <target name="check.properties" depends="display.properties">
   
           <condition property="properties.ok">
               <and>
  @@ -171,7 +197,7 @@
   
       <!--
          ========================================================================
  -         Find out if we're using J2EE
  +         Find out the J2EE API version
          ========================================================================
       -->
       <target name="check.j2ee.version">
  @@ -188,34 +214,29 @@
   
           <fail message="Unsupported J2EE version" unless="j2ee.api"/>
   
  +        <echo message="j2ee.api = ${j2ee.api}"/>
  +
       </target>
   
       <!--
          ========================================================================
  +         Load all dynamic properties
  +       ========================================================================
  +    -->
  +    <target name="load.properties"
  +        depends="properties.source"/>
  +
  +    <!--
  +       ========================================================================
            Initialize the build. Must be called by all targets
          ========================================================================
       -->
       <target name="init"
  -        depends="check.properties,check.j2ee.version,properties.source,properties.deliverables">
  +        depends="check.properties,check.j2ee.version,load.properties">
   
           <tstamp/>
   
  -        <echo message="----- ${project.name.text} ${project.version} -----"/>
  -        <echo message=""/>
  -        <echo message="java.class.path = ${java.class.path}"/>
  -        <echo message=""/>
  -        <echo message="java.home = ${java.home}"/>
  -        <echo message="user.home = ${user.home}"/>
  -        <echo message="ant.home = ${ant.home}"/>
  -        <echo message=""/>
  -        <echo message="j2ee.jar = ${j2ee.jar}"/>
  -        <echo message="  => j2ee.api = ${j2ee.api}"/>
  -        <echo message=""/>
  -
  -        <!-- Filters -->
           <filter token="version" value="${project.version}"/>
  -        <filter token="year" value="${year}"/>
  -        <filter token="today" value="${TODAY}"/>
           <filter token="project.name.text" value="${project.name.text}"/>
           <filter token="project.name.file" value="${project.name.file}"/>
   
  @@ -274,7 +295,7 @@
           <copy todir="${target.conf.dir}" file="${conf.dir}/manifest"
               filtering="on"/>
   
  -        <jar destfile="${target.dir}/${framework.jar.name}.jar"
  +        <jar jarfile="${target.dir}/${framework.jar.name}.jar"
             manifest="${target.conf.dir}/manifest">
               <fileset dir="${target.classes.java.dir}"/>
           </jar>
  @@ -314,10 +335,33 @@
   
       <!--
          ========================================================================
  +         Run the full suite of unit tests.
  +       ========================================================================
  +    -->
  +    <target name="test" depends="jar" description="Run the unit tests">
  +
  +        <junit printsummary="yes" haltonfailure="yes" fork="yes">
  +
  +            <classpath>
  +                <path path="${target.classes.java.dir}"/>
  +                <path path="${target.classes.test.dir}"/>
  +                <path refid="project.class.path"/>
  +            </classpath>
  +
  +            <formatter type="plain" usefile="false"/>
  +
  +            <test name="org.apache.cactus.TestAll"/>
  +
  +        </junit>
  +
  +    </target>
  +
  +    <!--
  +       ========================================================================
            Generate the distributable files
          ========================================================================
       -->
  -    <target name="dist" depends="jar,doc"
  +    <target name="dist" depends="jar,test,doc"
           description="Generate the distributable files">
   
           <mkdir dir="${dist.lib.dir}"/>
  @@ -337,77 +381,13 @@
   
       <!--
          ========================================================================
  -         Common script for both "release" and "nightly" targets. Must only be
  -         called by "release" or "nightly" target as it needs the following
  -         properties defined before calling it :
  -
  -             anttasks.release.name
  -
  -       ========================================================================
  -    -->
  -    <target name="release.common" depends="clean,dist">
  -
  -        <mkdir dir="${release.dir}"/>
  -
  -        <zip destfile="${release.dir}/${framework.release.name}.zip">
  -            <fileset dir="${dist.dir}"/>
  -        </zip>
  -
  -    </target>
  -
  -    <!--
  -       ========================================================================
  -         Generate a full release (i.e. the zipped release file)
  -       ========================================================================
  -    -->
  -    <target name="release.prepare" depends="init">
  -
  -        <!-- For a release, the suffix is the version -->
  -        <property name="project.suffix" value="-${project.version}"/>
  -
  -        <!-- Name of full release -->
  -        <property name="framework.release.name"
  -            value="${project.prefix}${framework.jar.name}${project.suffix}"/>
  -
  -    </target>
  -
  -    <target name="release" depends="release.prepare,release.common"
  -        description="Generate the release">
  -    </target>
  -
  -    <!--
  -       ========================================================================
  -         Generate a nightly release (i.e. the zipped release file)
  -       ========================================================================
  -    -->
  -    <target name="nightly.prepare" depends="init">
  -
  -        <!-- Sets the date for the release prefix : YYYYMMDD -->
  -        <tstamp/>
  -
  -        <!-- Suffix to add to all distributable files -->
  -        <property name="project.suffix" value="-${DSTAMP}"/>
  -
  -        <!-- Name of nightly release -->
  -        <property name="framework.release.name"
  -            value="${project.prefix}${framework.jar.name}${project.suffix}"/>
  -
  -    </target>
  -
  -    <target name="nightly" depends="nightly.prepare,release.common"
  -        description="Generate the release">
  -    </target>
  -
  -    <!--
  -       ========================================================================
            Clean generated files (including distributables)
          ========================================================================
       -->
  -    <target name="clean" depends="init" description="Clean all generated files">
  +    <target name="clean" description="Clean all generated files">
   
           <delete dir="${target.dir}"/>
           <delete dir="${dist.dir}"/>
  -        <delete dir="${release.dir}"/>
   
       </target>
   
  @@ -427,7 +407,7 @@
           <echo message="Errors are reported in ${target.dir}/checkstyle_errors.xml"/>
   
           <checkstyle paramPattern="^(the|is|has)[A-Z][a-zA-Z0-9]*$"
  -            allowProtected="true" headerFile="LICENSE">
  +            allowProtected="true" headerFile="LICENSE.cactus">
   
               <fileset dir="${src.java.dir}">
                   <include name="**/*.java"/>
  
  
  
  1.2       +2 -2      jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/server/FilterImplicitObjects.java
  
  Index: FilterImplicitObjects.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/src/java/j2ee13/org/apache/cactus/server/FilterImplicitObjects.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FilterImplicitObjects.java	1 Mar 2002 00:43:45 -0000	1.1
  +++ FilterImplicitObjects.java	10 Mar 2002 13:58:25 -0000	1.2
  @@ -63,9 +63,9 @@
    *
    * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
    *
  - * @version $Id: FilterImplicitObjects.java,v 1.1 2002/03/01 00:43:45 vmassol Exp $
  + * @version $Id: FilterImplicitObjects.java,v 1.2 2002/03/10 13:58:25 vmassol Exp $
    */
  -public class FilterImplicitObjects extends WebImplicitObjects
  +public class FilterImplicitObjects extends AbstractWebImplicitObjects
   {
       /**
        * The Filter configuration object.
  
  
  
  1.2       +3 -4      jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractTestCaller.java
  
  Index: AbstractTestCaller.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractTestCaller.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractTestCaller.java	1 Mar 2002 00:43:46 -0000	1.1
  +++ AbstractTestCaller.java	10 Mar 2002 13:58:25 -0000	1.2
  @@ -57,8 +57,8 @@
   package org.apache.cactus.server;
   
   import java.io.IOException;
  -import java.io.ObjectOutputStream;
   import java.io.OutputStream;
  +import java.io.ObjectOutputStream;
   import java.lang.reflect.Constructor;
   import javax.servlet.ServletException;
   
  @@ -75,7 +75,7 @@
    *
    * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
    *
  - * @version $Id: AbstractTestCaller.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
  + * @version $Id: AbstractTestCaller.java,v 1.2 2002/03/10 13:58:25 vmassol Exp $
    */
   public abstract class AbstractTestCaller
   {
  @@ -184,8 +184,7 @@
           // Write back the results as a serialized object to the outgoing stream.
           try {
   
  -            OutputStream os =
  -                this.webImplicitObjects.getHttpServletResponse().
  +            OutputStream os = this.webImplicitObjects.getHttpServletResponse().
                   getOutputStream();
   
               // Write back the result object as a serialized object
  
  
  
  1.2       +3 -2      jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractTestController.java
  
  Index: AbstractTestController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractTestController.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractTestController.java	1 Mar 2002 00:43:46 -0000	1.1
  +++ AbstractTestController.java	10 Mar 2002 13:58:25 -0000	1.2
  @@ -72,7 +72,7 @@
    *
    * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
    *
  - * @version $Id: AbstractTestController.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
  + * @version $Id: AbstractTestController.java,v 1.2 2002/03/10 13:58:25 vmassol Exp $
    */
   public abstract class AbstractTestController
   {
  @@ -179,7 +179,8 @@
   
           if (serviceName == null) {
               String message = "Missing service name parameter [" +
  -                ServiceDefinition.SERVICE_NAME_PARAM + "] in HTTP request.";
  +                ServiceDefinition.SERVICE_NAME_PARAM + "] in HTTP request. " +
  +                "Received query string is [" + queryString + "].";
               LOGGER.debug(message);
               throw new ServletException(message);
           }
  
  
  
  1.2       +1 -2      jakarta-cactus/framework/src/java/share/org/apache/cactus/server/JspImplicitObjects.java
  
  Index: JspImplicitObjects.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/JspImplicitObjects.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JspImplicitObjects.java	1 Mar 2002 00:43:46 -0000	1.1
  +++ JspImplicitObjects.java	10 Mar 2002 13:58:25 -0000	1.2
  @@ -66,7 +66,7 @@
    *
    * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
    *
  - * @version $Id: JspImplicitObjects.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
  + * @version $Id: JspImplicitObjects.java,v 1.2 2002/03/10 13:58:25 vmassol Exp $
    */
   public class JspImplicitObjects extends ServletImplicitObjects
   {
  @@ -112,5 +112,4 @@
       {
           this.jspWriter = theWriter;
       }
  -
   }
  
  
  
  1.2       +1 -11     jakarta-cactus/framework/src/java/share/org/apache/cactus/server/JspTestRedirector.java
  
  Index: JspTestRedirector.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/JspTestRedirector.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JspTestRedirector.java	1 Mar 2002 00:43:46 -0000	1.1
  +++ JspTestRedirector.java	10 Mar 2002 13:58:25 -0000	1.2
  @@ -68,20 +68,10 @@
    *
    * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
    *
  - * @version $Id: JspTestRedirector.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
  + * @version $Id: JspTestRedirector.java,v 1.2 2002/03/10 13:58:25 vmassol Exp $
    */
   public class JspTestRedirector
   {
  -    /**
  -     * Initialize the logging subsystem so that it can get it's configuration
  -     * details from the correct properties file. Initialization is done here
  -     * as this servlet is the first point of entry to the server code.
  -     */
  -    static
  -    {
  -        LogService.getInstance().init("/log_server.properties");
  -    }
  -
       /**
        * The logger
        */
  
  
  
  1.2       +2 -2      jakarta-cactus/framework/src/java/share/org/apache/cactus/server/ServletImplicitObjects.java
  
  Index: ServletImplicitObjects.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/ServletImplicitObjects.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletImplicitObjects.java	1 Mar 2002 00:43:46 -0000	1.1
  +++ ServletImplicitObjects.java	10 Mar 2002 13:58:25 -0000	1.2
  @@ -65,9 +65,9 @@
    *
    * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
    *
  - * @version $Id: ServletImplicitObjects.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
  + * @version $Id: ServletImplicitObjects.java,v 1.2 2002/03/10 13:58:25 vmassol Exp $
    */
  -public class ServletImplicitObjects extends WebImplicitObjects
  +public class ServletImplicitObjects extends AbstractWebImplicitObjects
   {
       /**
        * The Servlet configuration object.
  
  
  
  1.2       +12 -46    jakarta-cactus/framework/src/java/share/org/apache/cactus/server/WebImplicitObjects.java
  
  Index: WebImplicitObjects.java
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/src/java/share/org/apache/cactus/server/WebImplicitObjects.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WebImplicitObjects.java	1 Mar 2002 00:43:46 -0000	1.1
  +++ WebImplicitObjects.java	10 Mar 2002 13:58:25 -0000	1.2
  @@ -57,81 +57,47 @@
   package org.apache.cactus.server;
   
   import javax.servlet.ServletContext;
  -import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  +import javax.servlet.http.HttpServletRequest;
   
   /**
  - * Holder class that contains the instances of the implicit objects that exist
  - * for all web requests. Namely they are <code>HttpServletRequest</code>,
  - * <code>HttpServletResponse</code> and <code>ServletContext</code>.
  + * Interface for implicit objects that exist
  + * for all web requests (<code>HttpServletRequest</code>,
  + * <code>HttpServletResponse</code> and <code>ServletContext</code>).
    *
    * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
    *
  - * @version $Id: WebImplicitObjects.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
  + * @version $Id: WebImplicitObjects.java,v 1.2 2002/03/10 13:58:25 vmassol Exp $
    */
  -public class WebImplicitObjects
  +public interface WebImplicitObjects
   {
       /**
  -     * The HTTP request object.
  -     */
  -    protected HttpServletRequest request;
  -
  -    /**
  -     * The HTTP response object.
  -     */
  -    protected HttpServletResponse response;
  -
  -    /**
  -     * The Context object.
  -     */
  -    protected ServletContext context;
  -
  -    /**
        * @return the <code>ServletContext</code> implicit object
        */
  -    public ServletContext getServletContext()
  -    {
  -        return this.context;
  -    }
  +    ServletContext getServletContext();
   
       /**
        * @param theContext the <code>ServletContext</code> implicit object
        */
  -    public void setServletContext(ServletContext theContext)
  -    {
  -        this.context = theContext;
  -    }
  +    void setServletContext(ServletContext theContext);
   
       /**
        * @return the <code>HttpServletResponse</code> implicit object
        */
  -    public HttpServletResponse getHttpServletResponse()
  -    {
  -        return this.response;
  -    }
  +    HttpServletResponse getHttpServletResponse();
   
       /**
        * @param theResponse the <code>HttpServletResponse</code> implicit object
        */
  -    public void setHttpServletResponse(HttpServletResponse theResponse)
  -    {
  -        this.response = theResponse;
  -    }
  +    void setHttpServletResponse(HttpServletResponse theResponse);
   
       /**
        * @return the <code>HttpServletRequest</code> implicit object
        */
  -    public HttpServletRequest getHttpServletRequest()
  -    {
  -        return this.request;
  -    }
  +    HttpServletRequest getHttpServletRequest();
   
       /**
        * @param theRequest the <code>HttpServletRequest</code> implicit object
        */
  -    public void setHttpServletRequest(HttpServletRequest theRequest)
  -    {
  -        this.request = theRequest;
  -    }
  -
  +    void setHttpServletRequest(HttpServletRequest theRequest);
   }
  
  
  
  1.1                  jakarta-cactus/framework/src/java/share/org/apache/cactus/server/AbstractWebImplicitObjects.java
  
  Index: AbstractWebImplicitObjects.java
  ===================================================================
  /*
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    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", "Cactus" 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 Group.
   *
   * 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
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  package org.apache.cactus.server;
  
  import javax.servlet.ServletContext;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  /**
   * Holder class that contains the instances of the implicit objects that exist
   * for all web requests. Namely they are <code>HttpServletRequest</code>,
   * <code>HttpServletResponse</code> and <code>ServletContext</code>.
   *
   * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
   *
   * @version $Id: AbstractWebImplicitObjects.java,v 1.1 2002/03/10 13:58:25 vmassol Exp $
   */
  public abstract class AbstractWebImplicitObjects implements WebImplicitObjects
  {
      /**
       * The HTTP request object.
       */
      protected HttpServletRequest request;
  
      /**
       * The HTTP response object.
       */
      protected HttpServletResponse response;
  
      /**
       * The Context object.
       */
      protected ServletContext context;
  
      /**
       * @return the <code>ServletContext</code> implicit object
       */
      public ServletContext getServletContext()
      {
          return this.context;
      }
  
      /**
       * @param theContext the <code>ServletContext</code> implicit object
       */
      public void setServletContext(ServletContext theContext)
      {
          this.context = theContext;
      }
  
      /**
       * @return the <code>HttpServletResponse</code> implicit object
       */
      public HttpServletResponse getHttpServletResponse()
      {
          return this.response;
      }
  
      /**
       * @param theResponse the <code>HttpServletResponse</code> implicit object
       */
      public void setHttpServletResponse(HttpServletResponse theResponse)
      {
          this.response = theResponse;
      }
  
      /**
       * @return the <code>HttpServletRequest</code> implicit object
       */
      public HttpServletRequest getHttpServletRequest()
      {
          return this.request;
      }
  
      /**
       * @param theRequest the <code>HttpServletRequest</code> implicit object
       */
      public void setHttpServletRequest(HttpServletRequest theRequest)
      {
          this.request = theRequest;
      }
  
  }
  
  
  
  1.2       +10 -1     jakarta-cactus/framework/web/jspRedirector.jsp
  
  Index: jspRedirector.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/framework/web/jspRedirector.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jspRedirector.jsp	1 Mar 2002 00:43:47 -0000	1.1
  +++ jspRedirector.jsp	10 Mar 2002 13:58:25 -0000	1.2
  @@ -1,4 +1,5 @@
  -<%@page import="org.apache.cactus.server.*" session="false" %><%
  +<%@page import="org.apache.cactus.server.*,
  +                org.apache.cactus.util.log.LogService" session="false" %><%
   
       /**                                                
        *                                                 
  @@ -15,6 +16,14 @@
        * 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);
  
  
  

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