Attached please find my web.xml and cactus.properties. 

The reason why I renamed the ServletRedirector to 
SnoopServlet is because when I ran TestSimpleServlet as 
an application (instead of webapp), it cannot find the 
ServletRedirector, so we use the SnoopServlet tha has the 
same role as the ServletRedirector from JRun V.3.1. Also 
when we ran it as application, we don't really need to use 
web.xml.

Thanks,
-Catherine      




# Configuration file for Cactus.

# Each project using Cactus need to have such a file put in the CLASSPATH
# (Meaning the directory containgin this file should be in the CLASSPATH, not
# the file itself of course ... :) )

# Defines the URLs that will be used by Cactus to call it's redirectors
# (Servlet and JSP). You need to specify in these URLs the webapp context
# that you use for your application. In the example below, the context is
# "test".

cactus.servletRedirectorURL = http://localhost:8100/demo/servlet/SnoopServlet
#cactus.jspRedirectorURL = http://charles1/test/JspRedirector

<web-app>

    <servlet>
        <servlet-name>ServletRedirector</servlet-name>
        <servlet-class>org.apache.commons.cactus.server.ServletTestRedirector</servlet-class>
        <init-param>
          <param-name>param1</param-name>
          <param-value>value1 used for testing</param-value>
        </init-param>
    </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>
    </servlet>

    

    

<servlet-mapping><url-pattern>/</url-pattern><servlet-name>SnoopServlet</servlet-name></servlet-mapping></web-app>

Reply via email to