Hi Pierce,

I can tell you how I've gotten it running on 3.5.2.

Setup-wise I have JUnit and Cactus in a project.
I've put my cactus.properties in as a resource
for that project.

Then when I start up the servlet engine, I've just
had to make sure that the JUnit project is in the
classpath.

For the WebSphere Test Environment I setup Cactus
with its own webapp by adding to IBM WS TE\properties\default.servlet_engine
this entry:

    <websphere-webgroup name="test">
       <description>Testing Web Application</description>
       <document-root>$approot$</document-root>
       <classpath>$approot$/servlets</classpath>
       <root-uri>/test</root-uri>
       <auto-reload enabled="true" polling-interval="3000"/>
       <shared-context>false</shared-context>
    </websphere-webgroup>

Then in IBM WS TE\hosts\default_host\
I put a directory named "test" and droped redirector.jsp
and a servlets folder which contains my test.webapp file.
I've included that file since it is a bit lengthy.

I don't know that this is the best way by any means,
but I've gotten it to work.

Best of luck,

Andrew


> -----Original Message-----
> From: Pierce, Keith [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 4:50 PM
> To: '[EMAIL PROTECTED]'
> Subject: [cactus] Problem running under Visual Age for Java
>
>
> I'm having trouble configuring Visual Age for Java's WebSphere Test
> Environment to run Cactus unit tests [I'm running VAJ 3.5.3].
> When I try to
> run a test, the method ServletHttpClient.doTest() fails at the statement
> connection.getInputStream(), which throws the following exception:
>
>      java.io.FileNotFoundException:
> http://localhost:8080/test/ServletRedirector
>
> Here's some relevant information. I've created file cactus.properties with
> the following entries and placed it at the root of WTE's
> classpath (it seems
> to find this file ok):
>
>     cactus.servletRedirectorURL =
> http://localhost:8080/test/ServletRedirector
>     cactus.jspRedirectorURL = http://localhost:8080/test/JspRedirector
>
> The WTE application's configuration file, default_app.webapp, contains the
> following XML entry that provides to WTE  the alias to the servlet
> redirector:
>
>
>    <servlet>
>       <name>ServletRedirector</name>
>       <description>Redirector servlet for Cactus</description>
>       <code>org.apache.commons.cactus.server.ServletTestRedirector</code>
>       <servlet-path>/test/ServletRedirector</servlet-path>
>       <autostart>true</autostart>
>    </servlet>
>
> Finally, here's the test method that causes the exception:
>
> /**
>  * Test that the controller logs on the user when presented with
>  * a valid aba number, that is, the user's aba number is placed in
>  * the HttpSession.
>  */
> public void testGoodLogon() {
>     try {
>         LogonClientController lcc = new LogonClientController();
>         lcc.logon(request, "091000022");
>         assertEquals("aba number not placed in session", "091000022",
> session.getAttribute("aba"));
>     } catch (Exception e) {
>         assert("logon \"091000022\" failed", false);
>     }
> }
>
>
>
> Keith Pierce
> FedACH Support Services
> Federal Reserve Bank of Minneapolis
> 612-204-6480
>

test.webapp

Reply via email to