struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <>
Subject Re: [struts2] Redirecting to different pages on validate method
Date Wed, 16 Jan 2008 15:34:33 GMT
One of the results to the action stanza should be named "input". The
"input" result is the one that is selected when validation fails.

For an individual action, it looks something like this:

        <action name="Login"  class="mailreader2.Login">
            <result name="input">/Login.jsp</result>

A default input result can also be set for an entire package, and then
changed for individual actions, as needed.

    <package name="subscription" namespace="/" extends="mailreader-support">
            <result name="input">/Subscription.jsp</result>

HTH, Ted

On Jan 16, 2008 6:51 AM, Marcos Mendonça <> wrote:
> Hello
> I have two diferrent jsp for an action. Its works all right, only
> problem is that, if there are validation errors it always returns to
> the same jsp, and that sometimes it's not the jsp that posted the
> data.
> What configuration I have to do in struts.xml or how to I decide on
> the validate method wich jsp it will render on validation errors?
> Thanks
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message