Docs for: v1.7.2 | v1.7 Last update: March 26 2006

# Forewords and Requirements This document describes steps to setup Cactus to unit test Server side code (i.e. EJBs, Servlets, etc) deployed to Weblogic 6.1 within JBuilder5 IDE. The steps described below apply to current release (Cactus 1.3 as of this writing) and assume that Cactus has been installed correctly (which means that you can run sample successfully). # Step 1: Create cactus.properties file Create cactus.properties file: Add entry to identify the URL of the redirector (see the Configuration Howto for details). # Step 2: Configure Cactus to work with JBuilder5 Follow these steps: Click Menu item Tools/Configure Libraries to open Configure Libraries wizard On the lefthand side of Configure Libraries wizard, click on New button to open New Library Wizard. Enter value `"cactus"` in the Name field. Choose `"user home"` from the Location drop down menu. Click on Add button to open the dialog to choose files. Navigate to `[cactus home]/lib/` directory, select `cactus.jar` and click OK button. Click on Add button again to open the dialog to choose files. Navigate to the directory where the `cactus.properties` file is saved. Click OK button. Click "Add as Class Path" button if "No Paths Found" dialog box pops up Follow steps 2 - 6 to add `junit.jar`, `httpclient.jar` and `aspectjrt.jar` which are all in `[cactus home]/lib` directory Optionally, add `log4j.jar` in `[cactus home]/lib` directory to enable cactus logging Click Menu item Project/Project Properties to open Project Properties dialog box Click Path tab and then Required Libraries tab Click Add button and add the libraries created above to your project. # Step 3: Configure Cactus for Weblogic6.1 Open `web.xml` in `WEB-INF` directory of the web application deployed on Weblogic Add the mapping for the redirector under the `<web-app>` element. Copy `cactus.jar`, `junit.jar`, `aspectjrt.jar` and `log4j.jar`(optional) to `WEB-INF/lib` directory of the web application Copy your classes files to `WEB-INF/classes` directory of the web application # Step 4: Run the test In JBuilder, click Menu item Project/Project Properties Click Run tab and then Application tab Open "Select Main Class for Project" dialog box and choose the test case class which has a main method in it. Run your project