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 Tue, 11 Mar 2003 00:26:46 GMT
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
>
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
>
tTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):125)
> 
> at
>
org.apache.cactus.server.ServletTestRedirector.doPost$ajcPostAround10$ajcVoi
>
dWrapper(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(
> 1k))
> 
> at
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirector.
>
java;org/apache/cactus/util/log/LogAspect.aj(1k):1151)
> 
> at
>
org.apache.cactus.server.ServletTestRedirector.doGet$ajcPostAround6(ServletT
>
estRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k):96)
> 
> at
>
org.apache.cactus.server.ServletTestRedirector.doGet$ajcPostAround6$ajcVoidW
>
rapper(ServletTestRedirector.java;org/apache/cactus/util/log/LogAspect.aj(1k
> ))
> 
> at
>
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirector.j
>
ava;org/apache/cactus/util/log/LogAspect.aj(1k):1151)
> 
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> 
> at
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> 
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> 
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:260)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> 
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:191)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> 
> at
>
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
> .java:527)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> 
> at
>
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
> 46)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> 
> at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> at
>
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> at
>
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
> 
> at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
> )
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:643)
> 
> at
>
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
> java:170)
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> eNext(StandardPipeline.java:641)
> 
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
> )
> 
> at
>
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
> 
=== message truncated ===


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

Mime
View raw message