jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: cactus and jetty integration
Date Mon, 20 Jan 2003 14:32:59 GMT
Hi Andy,


Unfortunately it's not written yet. However, the good news is that it is
very simple to use and there is an example of how to use it from Ant in
the Cactus CVS
(http://cvs.apache.org/viewcvs/jakarta-cactus/sample-jetty/). Basically,
it simply means using the following:


        <junit printsummary="yes" haltonfailure="yes" haltonerror="yes"
            <jvmarg value="-Dcactus.jetty.resourceDir=${web.dir}"/>
                <!-- Cactus.propertie and log_client.properties need to
be in
                     the classpath -->
                <pathelement location="${target.conf.client.dir}"/>
                <pathelement location="${target.classes.sample.dir}"/>
                <pathelement location="${target.classes.unit.dir}"/>
                <path refid="project.class.path"/>
            <formatter type="plain" usefile="false"/>
            <!-- Note: The unit tests must be run first. See
                 org.apache.cactus.unit.TestAll for details -->
            <test name="org.apache.cactus.unit.TestAll"/>
            <test name="org.apache.cactus.sample.TestAll"/>


This will automatically start Jetty, run the tests and stop it. You only
need to have all the jars present in the <classpath>.


For the IDE integration, it is very easy and similar. Here are the few
steps to follow:


-        add the jetty jar and all your cactus jars in your project

-        define a junit configuration for your test case (this action
depends on your IDE). In this configuration, make sure you pass the
following system properties to the JVM that is started:


-Dcactus.contextURL and -Dcactus.initializer (see the <junit> ant task


Note: The other 2 properties are optional and only needed if you're
using if you need to add specific entries in the jetty web.xml
equivalent or if use JspTestCase.


Hope it helps,



-----Original Message-----
From: Andy Cooper [mailto:andy.cooper@APPIQ.com] 
Sent: 15 January 2003 14:42
To: vmassol@octo.com
Subject: cactus and jetty integration




Saw on the archives that you'd created a cactus/jetty integration and

planning on writing a short tutorial on how to get things to work. If
you've done

that, where can I find it?





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message