You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Craig R. McClanahan" <Cr...@eng.sun.com> on 2000/07/05 18:44:23 UTC

Re: [suggestion] how about adding findRedirect method in ActionForward class

It is possible to use ActionForward for both forwarding and
redirecting.  A couple of common approaches:

(1) You can initialize an individual ActionForward entry in action.xml
to say "I want Struts to redirect to this URL instead of forward to it"
like this:

    <forward name="logon" path="logon.jsp" redirect="true"/>

(2) You can change the default mechanism from forwarding to redirecting
by modifying the servlet initialization parameters for the controller
servlet in "web.xml":

    <servlet>
        <servlet-name>action</servlet-name>
        ...
        <init-param>
            <param-name>forward</param-name>

<param-value>org.apache.struts.action.RedirectingActionForward</param-value>

        <init-param>

If you do this, all ActionForward entries configured in "action.xml"
will be set to redirect, *unless* you specifically tell it not to:

    <forward name="logon" path="/logon.jsp" redirect="false"/>

Craig McClanahan



Multi Page Form

Posted by Robert Edgar <ro...@hkstar.com>.
Can some give me an idea on how multipage forms are supposed to work.

i.e. in the stuts registration example its a single page form that gets auto
validated, but how do you handle this in multi page forms when you wont yet
have completed parts of the form that maybe required but are on a differnet
page. I cant see how to handle this other than just manually validate each
page of the form by itself.

Rob