I want to use jakarta cactus for testing struts
action classes.
I am using websphere RAD , struts 1.2.6
,jakarta-cactus-12-1.7.1 and websphere 5.1
This is catcus.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:9080/PAC_WEB/ServletRedirector
cactus.jspRedirectorURL =
http://localhost:9080/PAC_WEB/JspRedirector
This is my .java file which tests one of my action
class.
public class TestOnlineProcessingAction extends
CactusStrutsTestCase {
public void setUp() throws Exception {
super.setUp(); }
public void tearDown() throws Exception {
super.tearDown(); }
public TestOnlineProcessingAction(String testName
){
super(testName);
}
public void testSucessfulOnlineProcessingAction(){
setRequestPathInfo("/onlineProcessing");
addRequestParameter("type","l");
actionPerform();
verifyForward("success");
}
}
I placed all the required jar files and
catcus.properties in classpath. Above mentioned file
compiles and no problems with compiler.
Here is the error I get when I run
TestOnlineProcessingAction
org.apache.cactus.util.ChainedRuntimeException:
Missing Cactus property [cactus.contextURL]
at
org.apache.cactus.internal.configuration.BaseConfiguration.getContextURL(BaseConfiguration.java:59)
at
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL_aroundBody0(AbstractWebConfiguration.java:46)
at
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL_aroundBody1$advice(AbstractWebConfiguration.java:188)
at
org.apache.cactus.internal.configuration.AbstractWebConfiguration.getRedirectorURL(AbstractWebConfiguration.java)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callRunTest(DefaultHttpClient.java:159)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:80)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:188)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:188)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
at
junit.framework.TestResult$1.protect(TestResult.java:106)
at
junit.framework.TestResult.runProtected(TestResult.java:124)
at
junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at
junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Please guide me what are the steps for configuring
jakarta-catcus in websphere RAD and what might be
causing this problem.
thanks®ards
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]