jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Arndt <jarndt...@yahoo.com>
Subject Re: followRedirects is false
Date Wed, 12 Mar 2003 20:52:40 GMT
If you could send me your war file...I could probably
help you out, but without seeing everything it's hard
to tell.  Sorry.  

I did have one other thought though....is your
ServletTestRedirector servlet that you're using
protected?

--- Joseph Milora <joemilora@cox.net> wrote:
> I've done the same.
> Only difference is yours works and mine doesn't.
> 
> I hope someone can shed some light on this error
> message.
> At least under what scenarios it can be thrown.
> 
> Thanks in advance,
> Joe Milora
> 
> 
> ----- Original Message -----
> From: "Jason Arndt" <jarndt196@yahoo.com>
> To: "Cactus Users List"
> <cactus-user@jakarta.apache.org>
> Sent: Tuesday, March 11, 2003 1:03 PM
> Subject: Re: followRedirects is false
> 
> 
> > 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 <joemilora@cox.net> 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=tes
>
tCorrectScope&Cactus_TestClass=us.mistura.web.actions.FeatureActionTEST&Cact
> us_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" <jarndt196@yahoo.com>
> > > To: "Cactus Users List"
> > > <cactus-user@jakarta.apache.org>
> > > 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 <joemilora@cox.net> 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
> > > > >
> 
=== message truncated ===


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

Mime
View raw message