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 eNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469) 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.StandardEngineValve.invoke(StandardEngineValve.java :174) 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.connector.http.HttpProcessor.process(HttpProcessor.java: 1040) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151 ) at java.lang.Thread.run(Thread.java:536) If more information is needed, let me know. BTW, everything works fine when done via the browser. Thanks in advance, Joe Milora ----- Original Message ----- From: "Jason Arndt" <[EMAIL PROTECTED]> To: "Cactus Users List" <[EMAIL PROTECTED]> Sent: Monday, March 10, 2003 2:11 PM Subject: Re: followRedirects is false > Hi Joe, > > I am using the cactus form-based authentication with > strutstest and it is working fine. Can you provide a > little more information about your error? The > redirects are supposed to be set to false...there is > something else going on. > > -- Jason > > -- Jason > --- Joseph Milora <[EMAIL PROTECTED]> wrote: > > Not to be rude, but... > > > > Is anyone on this list??????? > > > > > > > > ----- Original Message ----- > > From: "Joseph Milora" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Friday, March 07, 2003 4:23 PM > > Subject: followRedirects is false > > > > > > Hi, > > > > I'm using the cactus and the struts test > > case[updated to work with the > > cactus nightly build] > > frameworks to test my application and I keep > > receiving > > > > Redirect requested but followRedirects is disabled. > > > > I'm trying to test some methods on my EJBs, but I > > need to set the security > > credentials in order to successfully call those > > methods. > > > > I use form authentication, and redirect to a login > > page, which uses JBoss > > and JAAS to get the security > > credentials from the database. I've also tried using > > basic authentication, > > putting the ServletRedirector in > > the url-pattern of the web resource collection, and > > I receive the same > > message. I use either > > > > webRequest.setAuthentication(new > > FormAuthentication("username", > > "password")); or > > > > webRequest.setAuthentication(new > > BasicAuthentication("username", > > "password")); > > > > (updating the web.xml to the appropriate security > > settings) > > > > So I can't test my EJB method calls, and I can't > > verify action forwards > > because instead of the expected > > > > forward I get: > > > Cactus_TestMethod=testCorrectScope&Cactus_TestClass=us.mistura.web.actions.F > > > eatureActionTEST&Cactus_AutomaticSession=true&Cactus_Service=CALL_TEST > > > > Is there a way to do this? > > > > Thanks in advance, > > > > Joe Milora > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - forms, calculators, tips, more > http://taxes.yahoo.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
