Last 15 days web site changes
These are the changes that happened to the Cactus web site for the past
15 days since the last site update (excluding the todo and changes
pages which are modified too often):
Cactus versions newer than 1.7 (released on ...)
Since version 1.7.1 of Cactus all changes are now recorded using
Apache's JIRA. The list of changes for an
unreleased version is available in the
JIRA roadmap report
and the released version changes in the
Cactus 1.7 (released on 28 Jan 2005)
Tested with Orion 1.6.0b, Orion 2.0.4, Tomcat 4.1.31, Tomcat 5.0.29,
Resin 2.1.14, Resin 3.0.9, JBoss 3.2.6.
Added support for Resin 3.0.9 and above.
Upgraded following dependencies: Commons BeanUtils to 1.7.0, Commons
Collections to 3.1, Commons HttpClient to 2.0.2 and Commons Logging
jvmArgs in the container tasks.
(FAL) Thanks to Matheus Bianconi. Fixes issue CACTUS-158.
<resin3x> element of the
<cactus> task is now correctly using the
user-defined port (
port attribute). The port was
previously hardcoded to
The Cactus Servlet Test Runner now re-initializes the Cactus
configuration when it is called the first time (in its
init() method). This allows testing several webapps
in the same JVM (i.e without restarting the container).
<jboss3x> container element now supports
running JBoss in a temporary directory, specified by the
tmpdir attribute. In addition, by using the
configDir attribute, you can now specify a
directory where you have stored a custom JBoss server configuration
(identified by the
This configuration will be copied to the tmp directory and used
to configure JBoss.
(VMA) Fixes issue CACTUS-119.
Cactus was failing with a
NullPointerException if the
response was not returning any output stream (which happens if
called for example).
(VMA) Thanks to Maxwell Grender-Jones. Fixes issue CACTUS-123.
java.lang.NumberFormatException: For input string:
"localhost"" error that was happening when using the
<cactus> task with JBoss 3.0.8. It was due to the fact that
JBoss 3.0.8 does not support the new
which works with newer versions of JBoss 3.x
(VMA) Thanks to Raphael Philipe Mendes da Silva. Fixes issue CACTUS-122.
<resin3x> tasks to start/stop
Resin 2.x/3.x instances.
Building Cactus from the sources now requires Ant 1.6.1+ (Ant 1.6.2
if you're using JDK 5). The Cactus build also been simplified a lot
and external libraries are automatically downloaded from ibiblio.org
if not present on the file system.
Ensure faster shutdown times with WebLogic 7.x by using the
FORCESHUTDOWN WebLogic command instead of the graceful
(VMA) Fixes issue CACTUS-120.
JettyTestSetup class now checks if the Jetty server
is already started and only starts it if it isn't running. It also
does not stops it if it was running before
was called. This is useful when you have a master test suite and when
you also wish to run your tests one by one.
(VMA) Fixes issue CACTUS-118.
Cactus 1.6.1 (released on 14 May 2004)
An error was introduced in the Servlet Test Runner during the
internal package refactoring that happened in Cactus 1.6. The
XMLTransformer could not be loaded and it resulted
(VMA) Fixes issue CACTUS-107.
Cactus 1.6 (released on 08 May 2004)
ServletTestRunner now looks for am optional
cactus.properties file and reads its properties. If
not defined it sets default values for the context URL of the
Cactus redirectors and for their mappings.
Updated web site documentation for enabling Cactus logging.
Due to some internal package restructuration (all non public API were
internal packages), the
jspredirector.jsp file was modified. If you have
installed this file manually somewhere, you'll need to remember to
Big internal restructuration: we have moved all the non public API
classes to java packages with the name
example the package
org.apache.cactus.internal is a
package containing some internal implementation. You should not use
any internal class in your own development as these classes may
change at any time in the future. If you find you need access to some
internal class, please send an email to the Cactus mailing class
explaining the reason and we may open up some API/SPI.
It was a Commons HttpClient wrapper on top of the
java.net.HttpURLConnection class. However, this class is
now fully integrated in the Commons HttpClient jar.
Added new optional nested
element for the
<cactus> task. It allows
specifying additional jars that will be put in the classpath used to
start/stop the specified containers.
Removed ability to choose different HTTP connection helpers. The only
one supported now is the Commons HttpClient one provided internally
by Cactus. Thus the
property is now removed.
Removed deprecated classes in the
org.apache.cactus.ant packages as they have been
deprecated for a long time.
Fixed bug in
the passed request was not the original request. The problem was
only apparent with Tomcat 3.x.
Added support for Tomcat 3.3.2 (note that this required adding the
commons-logging jar to the Tomcat bootstrap classpath).
In the Form authentication code, changed the response check logic
for the pre-authentication step to accept any status code less
than 400. It was previously only accepting a 302 code but different
servers are implementing it differently.
(VMA) Thanks to Kazuhito Suguri.
which allows to programatically define Context init parameters (as
if they had been entered in
web.xml using the
Added support in the Ant integration
Updated the version of Commons HttpClient in the Cactus distribution
to 2.0 final.
that allows to set the expected HTTP response code for an
authentication request which should be successful. If not
specified, it defaults to
(VMA) Thanks to Kazuhito Suguri.
that allows to set the security cookie name to a name different than
JSESSIONID (the default).
(VMA) Thanks to Kazuhito Suguri.
FormAuthentication no longer assumes "localhost" when
(VMA) Thanks to Kazuhito Suguri. Fixes issue CACTUS-37.
Fixed bug in Cactus wrapper implementation of
request.getPathTranslated() which was failing when there
was no simulated URL defined (i.e. no call to
(VMA) Thanks to Paul Green.
Migrated to Apache license 2.0.
<cactus> task now also cleans custom tmp
directories (passed using the
(VMA) Thanks to Daniel Rabe. Fixes issue CACTUS-79.
Added support for specifying which JNDI port to use when shutting
down JBoss 3.x in the Cactus Ant integration.
<jboss3x> nested element now supports the new
jndiport attribute for specifying the port. If not
specified, it defaults to 1099.
(VMA) Thanks to James Carpenter. Fixes issue CACTUS-85.
encoding HTTP parameter for the Cactus Servlet
TestRunner. By default the XML returned (when there is no server-side
XSL transformation) is using the UTF-8 encoding. This
encoding parameters allows using a user-specified
request.getRequestURL() (J2EE 1.3 only) which was
not working properly when
WebRequest.setURL() was called
with a null pathinfo parameter.
(VMA) Thanks to Scott Leberknight. Fixes issue CACTUS-89.
Added support for Resin 3.x in the Ant integration. Only Resin 3.0.5
and above are supported (the reason is that it seems the configuration
file format has changed between Resin 3.0.3 and 3.0.5). Note that
Servlet API 2.4/JSP 2.0 are not yet supported by Cactus.
In the Ant integration, added new
<tomcat4x> nested elements of the
<cactus> task. This is to support the context xml
configuration file that appeared with Tomcat 4.1.x. Note that for
Tomcat 5.x you need to use the existing nested
<conf> element (see the
task documentation for more details).
In the Ant integration, added support for web contexts defined in
(VMA) Thanks to Brian Topping. Fixes issue CACTUS-84.
Fixed the bug where a ServletException occurs, stating:
The request object passed to forward() must be the request
object you got from your Cactus test case (i.e. a Cactus request
wrapper object). Instead we got [...].
In the Ant integration module, added new
attribute to the
element of the
(VMA) Fixes issue CACTUS-53.
<cactus> task work on Mac OSX by not
tools.jar file (on Mac OSX all classes
are found in
(VMA) Thanks to Joe Germuska.
commons-httpclient jar to be present
on the server-side classpath.
(VMA) Thanks to Kazuhito Suguri.
Added the Maven plugin. It was formerly hosted in the Maven project's
own CVS. It is now in the Cactus CVS and is part of the Cactus
Cactus 1.5 (released on 23 November 2003)
In the Cactus/Ant integration, user-defined
web.xml are now correctly replacing the default
version provided by Cactus. This is for the Tomcat 4.x and 5.x
The Jetty Test Setup was not shutting Jetty down if an error ocurred
(VMA) Thanks to James Stangler. Fixes issue CACTUS-63.
Cactus 1.5-rc1 (released on 26 October 2003)
The Cactus Ant integration now reports the HTTP error code when it
fails to start the container and timeouts. It was previously doing
this but only in debug mode.
(VMA) Thanks to Norbert Pabis. Fixes issue CACTUS-58.
Update the version of Commons HttpClient in the Cactus distribution to
Fixed and improved logging. It now works with Log4j, JDK 1.4 logging
and Commons Simple log. Check the sample servlet application for an
example of how to set up Cactus logging.
Added new optional
property. If specified Cactus will load the properties file pointed
by this property and will set each property as a system property.
Updated to use AspectJ 1.1.1. When you upgrade to Cactus 1.5-rc1
make sure you update your
aspectjrt.jar to version
1.1.1 (the jar is provided in the Cactus distribution).
Added an EJB sample application to demonstrate how to perform EJB
unit testing with Cactus and how to automate it with the
When using the new
ServletTestSuite wrapper around pure
JUnit test cases, the
tearDown() methods were not called.
(VMA) Thanks to Alexander Ananiev.
In the Ant integration, when using the <cactus> task with
an EAR, the test webapp context was not correctly set.
(VMA) Thanks to Jonathan Kovacs. Fixes issue CACTUS-52.
JettyTestSetup class so that it stops the
running Jetty server at the end of the test suite execution.
(VMA) Thanks to James Stangler. Fixes issue CACTUS-49.
The Cactus distribution now packages commons-httpclient 2.0 RC1
(we were previously including version 2.0 beta2).
Support for WebLogic 7.x is now working fine. Fixed bugs in the
WebLogic 7.x configuration: the
weblogic.xml file was not correctly copied
WEB-INF directory of the cactified
war, and an NPE happened when the bea home property was not
set. It now tries to guess it from the
cactus.home.weblogic7x property if not set.
In addition, the configuration has also been greatly simplified.
In the cactifywar Ant task, changed the default realm name
that is used when adding Cactus default configuration data.
It was previously
Cactus test realm. It is now
myrealm. The reas on is that the default WebLogic
configuration creates a
myrealm realm and thus
using this name makes our Cactus configuration for WebLogic
much simpler. It doesn't affect the other containers as they
do not seem to check for the realm name.
Added the ability to define the JBoss port that will be used
in the Ant integration to poll if the JBoss server is up and
running. Note: This value will not modify the port of the
default JBoss configuration (it is still 8080). However, it
is useful for users who have defined their own JBoss
configuration and are using a port other than 8080.
(VMA) Thanks to Florin Vancea.
Fixed bug in Eclipse plugin build where the plugin version was not
(VMA) Thanks to Christopher Marshall. Fixes issue CACTUS-47.
Cactus 1.5-beta1 (released on 14 July 2003)
Support for WebLogic 7.x has not been tested with Cactus 1.5 and
may not work.
Support for WebLogic 6.x is still available in the Ant integration.
However, it has not been tested as it is no longer possible to
download WebLogic 6.x from the BEA web site. It is thus completely
Update of jars bundled in the Cactus distribution: Commons Logging
1.0.3, Log4j 1.2.8, HttpClient 2.0beta2, HttpUnit 1.5.3 and
JUnit 3.8.1. In addition the requirements for the jars needed to
build Cactus were also updated: Checkstyle 3.1 (and the dependent
jars: BeanUtils 1.6.1, Collections 2.1, Regexp 1.2 and Antlr 2.7.2).
Added a Cactus books section
for books covering the Cactus framework.
XXXTestCase class hierarchy. Whereas
it was previously inheriting from
AbstractTestCase it is now simply inheriting
TestCase. Thus all non-public API are now
not visible from user (as they should be). This has broken binary
compatibility. If you had some framework compiled with Cactus 1.4.1
and using some methods from
AbstractTestCase, you'll need to recompile it
with Cactus 1.5.
to simulate a remote user. Thus, there is now 2 methods to get a
remote user: by simulating it as above or by using real BASIC or
Refactored the authentication support by introducing the interface
Authentication, which the class
AbstractAuthentication now implements.
Added a quick tutorial for Cactus developers who want to
set up their Eclipse
environment to work on the Cactus plugins for Eclipse.
WebResponse class now has a method to directly
retrieve the status code.
When a simulation URL is used and null values are passed for the
Server name, Context Path and Servlet Path parameters, calls to
HttpServletRequestWrapper.getServletPath() now correctly
return the values from the original Request object
(and not the wrapped one), handled by the Servlet Redirector.
Added verification code in Cactus to verify that the parameters
passed to the
WebRequest.setURL() method have the
correct format and throw an exception if not.
Added a RSS feed for Cactus news.
The Cactus web site has a new style that is heavily based on CSS.
It should provide better printing capabilities and a more consistent
Cactus was not correctly handling the
exception introduced by JUnit 3.8.1 and these exceptions were
reported as errors instead of failures.
(VMA) Thanks to Misak Boulatian. Fixes issue CACTUS-22.
Fixed bug in Cactus exception handling where an invalid test result
could result in a
hiding the real problem.
(VMA) Thanks to Melissa White.
Added a new custom Ant task (WebXmlMerge) that merges the content of
two web deployment descriptors into one. That includes the
definitions of filters and servlets, as well as some security-related
Allows creating Cactus TestCase without the need for a constructor
that takes a String parameter (a default constructor is good enough).
Obviously, this feature works only with JUnit 3.8.1 (but Cactus
continues to support JUnit 3.7).
Added ability to add any additional HTTP parameters to the request
used by Cactus to the Form-based authentication security URL.
Added support for running pure JUnit TestCase on the server side
using Cactus. This is possible by using a new
ServletTestSuite Test Suite.
Fixed bug where a simulation URL would be used even when none has
been defined (Reminder: a simulation URL is defined by calling
(VMA) Thanks to Helen Rehn.
Added a timeout for the
<runservertests> Ant task
so that the verification that the container is started is stopped if
this timeout is reached (a build exception is raised).
Moved some Ant tasks that were previously in the Cactus Ant tasks;
they are now in the Ant Integration project. They are the tasks used
to start/stop the containers and the
task. It is now recommended to use the Ant Integration.
Improved (and normalized) build system. This change should not
affect nor be visible by Cactus end-users. However, Cactus power
users building Cactus from sources will appreciate.
Improved test classe names in the Servlet Sample application.
The Servlet Sample build is now using the Cactus Ant Integration.
New Cactus Ant Integration. It provides new custom Ant tasks
which makes executing Cactus tests from an Ant build script
Modified the build process to generate the Cactus web site by
removing the use of Stylebook and replacing it with an XSL
stylesheet. In addition, added several new features: support for
subdirectories, support for dynamic menu items and sitemap
runservertests custom Ant task has been
improved and it is now propagating correctly Ant references to the
targets you defined for starting the container, stopping it and
runnning the Cactus tests. Previously, it was only propagating
the Ant properties.
Added stack trace filtering to the ServletTestRunner. Stack frames
in the JUnit framework classes as well as in the Cactus base test
case classes are filtered out.
The Cactus web site now provides online documentation for both the
CVS HEAD version and the last released version.
ServletTestRunner to run in an environment
where it is not allowed to set system properties. In such cases, the
cactus.properties configuration file needs to be on the
Implemented server-side XSLT transformations in the
ServletTestRunner. The code is based on the TraX API but
uses reflection to avoid a direct runtime dependancy.
Added automated Ant scripts for JBoss/Jetty 3.x.
Fixed bug where users using a Locale which does not format numbers
with dots (".") had issues with the JUnitReport Ant XSL stylesheet.
The Servlet Test Runner code now forces a US Locale.
Added new extension class to help unit test JSP Taglibs. See the
TestJspTagLifecycle test class in the sample-servlet
application for help on using it.
(VMA) Thanks to Christopher Lenz.
Improved error handling when dealing with invalid Cookies.
Fixed a potential bug with classloaders. On the server side, Cactus
looks for the TestCase class by searching first the WebApp
Classloader and then the Context ClassLoader. However, the Context
ClassLoader is only searched if an Exception (subclass of
Exception) is raised. Thus, if a
NoClassDefFoundError had been raised, Cactus would
not have searched in the Context ClassLoader.
(VMA) Thanks to Roumen B. Antonov.
Added support for internationalization (double byte characters) for
sending back test results. This allows Cactus to be used with any
(VMA) Thanks to Atsushi Hasegawa.
Fixed bug where a redirector overriden by calling
WebRequest.setRedirectorName() was not used to fetch the
Cactus test result (the default redirector specified in the Cactus
configuration was used instead).
(VMA) Thanks to Pranab Dhar.
Fixed bug where Cactus was using the deprecated HttpClient
PostMethod.setRequestBody(String) which had some bug
related to char to byte encoding. Now using the
(VMA) Thanks to Stephan Merker.
Added links to Japanese and Korean translations of Cactus.
Ability to get a real HTTP Session cookie before the start of the
test. This is achieved by calling the new
WebRequest.getSessionCookie() method which returns
HttpSessionCookie object that you then add to the
HTTP request. Initially suggested by
WebResponse.getCookieIgnoreCase(cookieName) to get
the first cookie matching
cookieName whatever the case
Added Form-based authentication support.
(VMA) Thanks to Jason Robertson.
Added a tutorial that explains
how to build Cactus from the sources.
Added a Jetty Sample application to demonstrate how to use the new
JettyTestSetup that automatically starts Jetty before
a test suite.
Added a Jetty integration
JUnit TestSetup to automatically start Jetty before a test suite
is executed. This is really nice to quickly run tests inside any
IDE or even from a simple
<junit> Ant taks without
the need to package and deploy a WAR. In addition, it is real nice to
debug tests this way. Moreover, Jetty starts in less than 1 second,
making it completely seamless and transparent! We are now at the same
order of magnitude as pure JUnit tests in term of speed ... :-). Of
course, this is only for Servlet tests ... I am still waiting for an
embeddable EJB container that starts in less than 1 second ...
Added support for client side
end(...) methods. They are called on the
client side, before and after every test in the same way as the
tearDown() are called
before and after each test, but on the server side.
Cactus 1.4.1 (released on 31 August 2002)
Added a sample (and thus a test for Cactus) for HttpUnit integration
as part of the Cactus sample.
(VMA) Thanks to Hirsch Richard.
Fixed bug in new HttpClient wrapper in Cactus with regards to the
headers returned in the HTTP response (they were offset by one and
the status line was not returned as a header).
(VMA) Thanks to Hirsch Richard.
Fixed bug where
NullPointerException would be thrown by Cactus
ServletTestRunner if an exception raised in a test case had not
specified a message (i.e.
(VMA) Thanks to Micah Williams.
Some JDK implementation return "null" when Class.getClassLoader() is
called to indicate that the given class has been loaded by the
bootstrap class loader. This was leading to
NullPointerException being thrown by Cactus in some
(VMA) Thanks to Gerhard Kreutzer.
Fixed import bug in sample-servlet which prevented building Cactus
from the sources on JDK 1.4.
(VMA) Thanks to Ville Skyttä.
Fixed default properties for the sample application so that it points
to the correct HttpClient jar which is packaged with Cactus (the one
built on 06/06/2002).
(VMA) Thanks to Hirsch Richard.
Fixed a bug that was preventing having several POST parameters added in
the request in
(VMA) Thanks to Larry Tambascio.
The encoding in the sample
stylesheet was set to be "US-ASCII". It is now set to "UTF-8".
Apparently, XSLT processors are only required to support utf-8
and utf-16, the rest is processor specific. For example your
processor might support US-ASCII-7 and others might support
US-ASCII. Thanks to Robert Koberg for the explanation!
(VMA) Thanks to Dave Hoover.
Cactus 1.4 (released on 25 August 2002)
Added a tutorial that explains how
to test JSPs with Cactus.
Fixed JDK 1.2 compatibility (broken in 1.4b1).
(VMA) Thanks to David George.
According to the XML definitions (at least the definitions Mozilla 1.0
got implemented), the <?xml version...> tag should go before the
<?xml-stylesheet...> tag. Using them in the wrong order produces
an error when Mozilla tries to render it.
(VMA) Thanks to Felipe Hoffa.
Cactus 1.4b1 (released on July 31 2002)
It is now possible to assert response codes in
endXXX(). For example, you can verify that you servlet
has returned a 500 response code. See the tests provided in the Sample
Servlet application which is part of the Cactus distribution. This
change was possible because we moved the underlying implementation from
HttpURLConnection to Jakarta
Commons HttpClient. Note:
It is still not possible to test a 401 response code (this limitation
has been raised to the HttpClient team).
Refactored internal code to be able to use different HTTP connection
implementation. 2 are currently provided: one using the JDK
HttpURLConnection and one using Jakarta
Commons HttpClient (the
default one). It can be modified by setting the following System
org.apache.cactus.client.JdkConnectionHelper (for the JDK
HttpURLConnection). Note that the Servlet Sample test
that assert response code will fail with the JDK
Cactus now requires the Commons Logging library
commons-logging.jar). It is needed as Commons HttpClient
is now using Commons Logging for logging and Cactus depends on
HttpClient. Cactus is also now using Commons HttpClient for all its
internal logs. This lets us use any underlying logging implementation:
Log4j, LogKit, JDK 1.4 Logging, No Logging or SimpleLog (provided with
Commons Logging - logs to the console). Check the
Config Howto for how
to configure logging in Cactus.
class (was deprecated in Cactus 1.2).
class (was deprecated in Cactus 1.2).
class (was deprecated in Cactus 1.2).
Added automatic script support for Orion 1.6.
Ant scripts for Resin, Orion, Tomcat 3.2.4, WebLogic 6.1 and WebLogic
7.0 now correctly configured for Cactus BASIC authentication tests.
Added automatic script support for WebLogic 7.0.
It seems that it is possible that the test result contain an end of
line character and the Cactus
choking on this and seeing the returned result as invalid. This has
(VMA) Thanks to Daniel Dennison. Fixes issue CACTUS-22.
Added Test Coverage Reports as part of the Web Site generation.
Renamed all external jars used in Cactus by suffixing them with their
versions. This is so that Cactus users will know exactly what jars
Cactus is packaging. You are of course free to use your own jars and
Cactus only packages these jars for your convenience. Cactus nows
packages Log4j 1.2.3, AspectJ Runtime 1.0.4, JUnit 3.7,
HttpClient 2.0alpha1 built on 6/6/2002, HttpUnit 1.4 and (new) the
Servlet API 2.2 and 2.3 jars. The Cactus jars have also been renamed
to include the version number in their names.
Cactus Sample can be built using Ant 1.4 (support for Ant 1.4 was
broken by a line introduced in Cactus 1.3 that would only work with
Ant 1.5. However, this line can easily be commented out).
jspRedirector.jsp so that
it initializes an HTTP Session (
is no way I know to make this parameter dynamic so we set it to true
as this is the most used case. If one of your test must not have a
session created for it, then you can always use the Redirector
overriding feature (
(VMA) Thanks to Marc Brette. Fixes issue CACTUS-21.
Fixed bug where the Test Result object which is put in the Servlet
Context was not serializable. This might cause some trouble with some
(VMA) Thanks to Patrick Lightbody.
Added simulation of Remote IP address and Remote Host Name, i.e. you
can now control what
request.getRemoteHost() will return. That is useful if
your code depends on these values.
(VMA) Thanks to Marc Brette.
It is now possible to specify the Cactus properties as System
properties (the property names are the same as the ones in
cactus.properties). Also if not specified, redirector
names are set by default to "ServletRedirector", "JspRedirector" and
New Quick start tutorial that
explains how to run Cactus tests quickly in Tomcat.
A cool new way to quickly execute your test cases: Cactus now has
a JUnit Test Runner called ServletTestRunner (it is a servlet) that
you start using your browser. See the
TestRunner Howto tutorial.
Test classes are now first looked for using the Current classloader
(the webapp one for Servlets) and if not found using the context
class loader. Previously the order was the revert, which was not
logical and could lead to issues.
Improved debugging of
runservertests task. Simply run
Ant in debug mode (
ant -debug xxx) and the task will
print information. Very useful to know why the
runservertests task seems to hang after starting your