I'm using the latest CVS of both from yesterday
3/11/2003.  I 

However, to get strutstest to build I had to modify
some of the strutstest import statements because the
wrapper classes have been moved into a new 'wrapper'
package in cactus.

I'm using commons-httpclient-2.0alpha3.jar and
aspectjrt-1.0.6.jar.

I did have a problem using httpclient-2.0alpha2 and
never figured out why, but alpha3 fixed the problem.


--- Joseph Milora <[EMAIL PROTECTED]> wrote:
> Hi Jason,
> 
> 1. The setRequestPathInfo call matches my
> struts-config.xml file
> 2. According to the log files the action is never
> being executed.
>     Calling actionPerform() in the test case does
> not generate any errors, though.
> 
> As far as verifying the forward, I get the following
> error message:
> 
> was expecting '/mistura/feature.do' but received
>
'http://[host][port]/mistura/ServletRedirector/feature?Cactus_TestMethod=testCorrectScope&Cactus_TestClass=us.mistura.web.actions.FeatureActionTEST&Cactus_AutomaticSession=true&Cactus_Service=CALL_TEST'
> 
> The url doesn't look right.
> 
> What versions of cactus and struts test case are you
> using?
> 
> Thanks,
> 
> Joe Milora
> 
> 
> 
> 
> 
> 
> 
> 
> ----- Original Message ----- 
> From: "Jason Arndt" <[EMAIL PROTECTED]>
> To: "Cactus Users List"
> <[EMAIL PROTECTED]>
> Sent: Monday, March 10, 2003 4:26 PM
> Subject: Re: followRedirects is false
> 
> 
> > Hi Joe,
> > 
> > I'm still not sure if I know what's going wrong
> > because everything looks good, but 2 things you
> can
> > try:
> > 
> > 1.  the setRequestPathInfo() call must match
> exactly
> > what's in your struts-config.xml - verify that it
> is
> > correct...should it be '/feature.do' vs
> 'feature.do'
> > 
> > 2.  can you put some logging in you action class
> to
> > make sure it's being called and if so, what's
> > happening?  specfically, what ActionForward it is
> > calling.
> > 
> > let me know if you get any further...
> > 
> > --- Joseph Milora <[EMAIL PROTECTED]> wrote:
> > > Thanks for the reply Jason.
> > > 
> > > As noted previously, I'm using JBoss security
> with
> > > my username and password
> > > stored in an Oracle
> > > database and form authentication on the web
> side.
> > > My cactus.properties file contains
> > > 
> > > cactus.contextURL=http://[host]:[port]/[context]
> > > cactus.servletRedirectorName=ServletRedirector
> > > cactus.enableLogging=true
> > > 
> > > 
> > > In my beginXXX method I have
> > > 
> > >  webRequest.setAuthentication(new
> > > FormAuthentication("username",
> > > "password"));
> > > 
> > > the testXXX method contains:
> > > 
> > >   setPathRequestInfo("feature.do");
> > >   setRequestParameter("name", "name");
> > >   setRequestParameter("description",
> "description");
> > >   actionPerform();
> > >   verifyForward("feature");
> > > 
> > > When I run the test without the verifyForward, I
> > > receive some "INFO:Redirect
> > > requested but followRedirects
> > > is disabled" messages. The test also displays an
> OK
> > > message, but the EJB
> > > methods aren't being called.
> > > 
> > > When the verifyForward method is left in I
> receive:
> > > 
> > >
> >
>
testXXX(us.mistura.web.actions.FeatureActionTEST)junit.framework.AssertionFa
> > > iledError: was expecting '/mistura/feature.do'
> but
> > > received
> > >
> >
>
'http://[host]:[port]/mistura/ServletRedirector/feature?Cactus_TestMethod=te
> > >
> >
>
stCorrectScope&Cactus_TestClass=us.mistura.web.actions.FeatureActionTEST&Cac
> > >
> tus_AutomaticSession=true&Cactus_Service=CALL_TEST'
> > > 
> > > at
> > >
> >
>
servletunit.struts.Common.verifyForwardPath(Common.java:241)
> > > 
> > > at
> > >
> >
>
servletunit.struts.CactusStrutsTestCase.verifyForward(CactusStrutsTestCase.j
> > > ava:535)
> > > 
> > > at
> > >
> >
>
us.mistura.web.actions.FeatureActionTEST.testCorrectScope(Unknown
> > > Source)
> > > 
> > > at
> > >
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > > 
> > > at
> > >
> >
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > > )
> > > 
> > > at
> > >
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > > .java:25)
> > > 
> > > at
> > >
> >
>
org.apache.cactus.AbstractWebServerTestCase.runServerTest(AbstractWebServerT
> > > estCase.java:168)
> > > 
> > > at
> > >
> >
>
org.apache.cactus.AbstractWebServerTestCase.runBareServerTest(AbstractWebSer
> > > verTestCase.java:126)
> > > 
> > > at
> > >
> >
>
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCaller.
> > > java:155)
> > > 
> > > at
> > >
> >
>
org.apache.cactus.server.AbstractWebTestController.handleRequest$ajcPostArou
> > >
> >
>
nd7(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj(1
> > > k):130)
> > > 
> > > at
> > >
> >
>
org.apache.cactus.server.AbstractWebTestController.handleRequest$ajcPostArou
> > >
> >
>
nd7$ajcVoidWrapper(AbstractWebTestController.java;org/apache/cactus/util/log
> > > /LogAspect.aj(1k))
> > > 
> > > at
> > >
> >
>
org.apache.cactus.server.AbstractWebTestController.handleRequest(AbstractWeb
> > >
> >
>
TestController.java;org/apache/cactus/util/log/LogAspect.aj(1k):1151)
> > > 
> > > at
> > >
> >
>
org.apache.cactus.server.ServletTestRedirector.doPost$ajcPostAround10(Servle
> > >
> 
=== message truncated ===


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to