2011/08/05 - Jakarta Cactus has been retired.

For more information, please explore the Attic.

Forewords and Requirements

This tutorial is written for Cactus 1.2 only. It will need to adapted if you're using Cactus 1.3

This tutorial explains how to run Cactus tests within VisualAge for Java Tomcat Test Environment.

The following tutorial has been tested with VisualAge 3.5.3 and Apache Tomcat Test Environment 3.1. Please tell us if you find that it works with other versions.


Let's call {VAJava dir} the directory where VAJava is installed. Let's also suppose that the context of our webapp is called myApp.

  • Import Cactus and JUnit into VisualAge as projects,
  • Add the Cactus redirector mappings to your web.xml file (see the Configuration Howto), which is located at {VAJava dir}\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\myApp\WEB-INF\,
  • Make sure the cactus.properties file has the correct URL for the redirectors (see the Configuration Howto). Put the file in {VAJava dir}\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\myApp\WEB-INF\,
  • Add the following directories to JUnit's TestRunner project classpath (project's properties dialog box):
{VAJava dir}\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\myApp\WEB-INF\;
{VAJava dir}\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\myApp\WEB-INF\classes\;
  • Add the Cactus project to both JUnit's TestRunner and Apache's TomcatRunner project classpath (project properties dialog boxes).