Hi Joe,
It doesn't look like the FeatureAction class is ever
being called...even through the browser.
The /feature path is mapped to a struts ForwardAction,
not your FeatureAction.
In your struts config change this:
<action
path="/feature"
type="org.apache.struts.actions.ForwardAction"
parameter="/WEB-INF/pages/feature.jsp"/>
To this:
<action
path="/feature"
type="us.mistura.web.actions.FeatureAction"
scope="request">
<forward name="feature"
path="/WEB-INF/pages/feature.jsp" />
</action>
Also, setRequestPathInfo("/feature");
Give that a shot and let me know if that fixes it.
-- Jason
--- Joseph Milora <[EMAIL PROTECTED]> wrote:
> I've attached my web.xml, struts-config.xml, action
> class,
> cactus.properties, and action test class.
> It's just a small project to test cactus, httpunit,
> and struts test case.
>
> The application works fine using the browser until I
> run the tests. Then
> I'll only get a blank page
> for feature.do, instead of the requested page. No
> errors, though.
>
> If anything else is needed, let me know.
>
> Thanks.
>
>
> ----- Original Message -----
> From: "Jason Arndt" <[EMAIL PROTECTED]>
> To: "Cactus Users List"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, March 12, 2003 12:52 PM
> Subject: Re: followRedirects is false
>
>
> > 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 <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]>
> > > To: "Cactus Users List"
> > > <[EMAIL PROTECTED]>
> > > 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 <[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=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" <[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");
> > > > > > >
>
=== message truncated ===> <?xml version="1.0"
encoding="UTF-8"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
> Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <web-app >
> <context-param>
>
> <param-name>
> javax.servlet.jsp.jstl.fmt.locale
> </param-name>
> <param-value>
> en-US
> </param-value>
> </context-param>
>
> <context-param>
>
> <param-name>
> javax.servlet.jsp.jstl.fmt.localizationContext
> </param-name>
> <param-value>
> resources/application
> </param-value>
> </context-param>
>
> <!--
> To use non XDoclet filters, create a filters.xml
> file that
> contains the additional filters (eg Sitemesh)
> and place it in your
> project's merge dir. Don't include
> filter-mappings in this file,
> include them in a file called
> filter-mappings.xml and put that in
> the same directory.
> -->
>
> <!--
> To use non XDoclet filter-mappings, create a
> filter-mappings.xml file that
> contains the additional filter-mappings and
> place it in your
> project's merge dir.
> -->
>
> <!--
> To use non XDoclet listeners, create a
> listeners.xml file that
> contains the additional listeners and place it
> in your
> project's merge dir.
> -->
>
> <servlet>
> <servlet-name>
> ServletRedirector
> </servlet-name>
> <servlet-class>
> org.apache.cactus.server.ServletTestRedirector
> </servlet-class>
> </servlet>
>
> <servlet>
>
> <servlet-name>
> action
> </servlet-name>
> <servlet-class>
> org.apache.struts.action.ActionServlet
> </servlet-class>
> <init-param>
> <param-name>
> config
> </param-name>
> <param-value>
> /WEB-INF/struts-config.xml
> </param-value>
> </init-param>
> <init-param>
> <param-name>
> debug
> </param-name>
> <param-value>
> 2
> </param-value>
> </init-param>
> <init-param>
> <param-name>
> detail
> </param-name>
> <param-value>
> 2
> </param-value>
> </init-param>
> <load-on-startup>
> 2
> </load-on-startup>
>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>
> ServletRedirector
> </servlet-name>
> <url-pattern>
> /ServletRedirector
> </url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
>
> <servlet-name>
> action
> </servlet-name>
> <url-pattern>
> *.do
> </url-pattern>
>
> </servlet-mapping>
>
> <!--
> To specify mime mappings, create a file named
> mime-mappings.xml, put it in your project's
> mergedir.
> Organize mime-mappings.xml following this DTD
> slice:
>
> <!ELEMENT mime-mapping (extension, mime-type)>
> -->
>
> <welcome-file-list>
>
> <welcome-file>
> jstl-index.jsp
> </welcome-file>
> <welcome-file>
> index.jsp
> </welcome-file>
> </welcome-file-list>
>
> <!--
> To specify error pages, create a file named
> error-pages.xml, put it in your project's mergedir.
> Organize error-pages.xml following this DTD
> slice:
>
> <!ELEMENT error-page ((error-code |
> exception-type), location)>
> -->
>
> <taglib>
>
> <taglib-uri>
> /tags/struts-bean
> </taglib-uri>
> <taglib-location>
> /WEB-INF/struts-bean.tld
> </taglib-location>
> </taglib>
>
> <taglib>
>
> <taglib-uri>
> /tags/struts-logic
> </taglib-uri>
> <taglib-location>
> /WEB-INF/struts-logic.tld
> </taglib-location>
> </taglib>
>
> <taglib>
>
> <taglib-uri>
> /tags/struts-html
> </taglib-uri>
> <taglib-location>
> /WEB-INF/struts-html.tld
> </taglib-location>
> </taglib>
>
> <taglib>
>
> <taglib-uri>
> /tags/struts-nested
> </taglib-uri>
> <taglib-location>
> /WEB-INF/struts-nested.tld
> </taglib-location>
> </taglib>
>
> <taglib>
>
> <taglib-uri>
> /tags/struts-template
> </taglib-uri>
> <taglib-location>
> /WEB-INF/struts-template.tld
> </taglib-location>
> </taglib>
>
>
=== message truncated ===> <?xml version="1.0"
encoding="ISO-8859-1" ?>
>
> <!DOCTYPE struts-config PUBLIC
> "-//Apache Software Foundation//DTD Struts
> Configuration 1.1//EN"
>
>
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
>
>
>
> <!--
>
> This is a blank Struts configuration file with
> an example
>
> welcome action/page and other commented sample
> elements.
>
>
>
> Tiles and the Struts Validator are configured
> using the factory defaults
>
> and are ready-to-use.
>
>
>
> NOTE: If you have a generator tool to create
> the corresponding Java classes
>
> for you, you could include the details in the
> "form-bean" declarations.
>
> Otherwise, you would only define the
> "form-bean" element itself, with the
>
> corresponding "name" and "type" attributes, as
> shown here.
>
> -->
>
>
>
>
>
> <struts-config>
>
>
>
> <!-- ==================================== Data
> Source Configuration -->
>
> <!--
>
> <data-sources>
>
> <data-source>
>
> <set-property
>
> property="autoCommit"
>
> value="false"/>
>
> <set-property
>
> property="description"
>
> value="Example Data Source Configuration"/>
>
> <set-property
>
> property="driverClass"
>
> value="org.postgresql.Driver"/>
>
> <set-property
>
> property="maxCount"
>
> value="4"/>
>
> <set-property
>
> property="minCount"
>
> value="2"/>
>
> <set-property
>
> property="password"
>
> value="mypassword"/>
>
> <set-property
>
> property="url"
>
>
> value="jdbc:postgresql://localhost/mydatabase"/>
>
> <set-property
>
> property="user"
>
> value="myusername"/>
>
> </data-source>
>
> </data-sources>
>
> -->
>
>
>
> <!-- ======================================== Form
> Bean Definitions -->
>
>
>
> <form-beans>
>
>
>
>
> <form-bean
>
> name="featureForm"
>
>
> type="org.apache.struts.action.DynaActionForm">
>
> <form-property
>
> name="name"
>
> type="java.lang.String"/>
>
> <form-property
>
> name="description"
>
> type="java.lang.String"/>
>
> </form-bean>
>
>
>
>
>
>
>
> </form-beans>
>
>
>
>
>
> <!-- ================================= Global
> Exception Definitions -->
>
>
>
> <global-exceptions>
>
> <!-- sample exception handler
>
> <exception
>
> key="expired.password"
>
> type="app.ExpiredPasswordException"
>
> path="/changePassword.jsp"/>
>
> end sample -->
>
> </global-exceptions>
>
>
>
>
>
> <!-- =================================== Global
> Forward Definitions -->
>
>
>
> <global-forwards>
>
> <!-- Default forward to "Welcome" action -->
>
> <!-- Demonstrates using index.jsp to forward
> -->
>
> <forward
>
> name="welcome"
>
> path="/Welcome.do"/>
>
>
=== message truncated ===>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
__________________________________________________
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]