|
Last update : June 18 2001
Home
Jakarta Commons
About
News
Features
Goals
Changes
Todo
Contributors
Contributing
License
Downloads
Downloads
Design
Architecture
Mock vs Container
User Guides
Installation
Installing Ant
Installing Sample
Configuration
Writing Test Case
Servlet Sample
Ant integration
Servlet Engines
API Reference
Support
CVS
Bug database
Mailing lists
FAQ
Misc.
Resources
|
Configuration |
Configuring Cactus is very simple. You simply need to provide a file
named cactus.properties that you will put in your
CLASSPATH (meaning you need to put the directory where this file is
located in your CLASSPATH, not the file itself !).
Moreover, in order for Cactus to work, you need to register a
generic servlet (called the Redirector servlet) and/or a generic JSP
(called the Redirector JSP) in your web.xml
file if you are using a web application or in your specific Servlet
engine configuration file if it does not support web applications
(see the installation
section for help on modifying your web.xml file).
 |
You need the Redirector JSP only if you want to make unit tests that
need to access JSP implicit objects (PageContext and
JspWriter ).
|
cactus.properties |
You need to se the following properties in your Cactus configuration
file (cactus.properties ) :
Property Name
|
cactus.servletRedirectorURL
|
Description
|
URL to which the Redirector Servlet is mapped to
|
Example
|
http://localhost:8080/test/ServletRedirector
|
Property Name
|
cactus.jspRedirectorURL
|
Description
|
URL to which the Redirector JSP is mapped to
|
Example
|
http://localhost:8080/test/JspRedirector
|
Sample cactus.properties file :
# 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:8080/test/ServletRedirector
cactus.jspRedirectorURL = http://localhost:8080/test/JspRedirector
|
|
|
|
|