struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Gin" <>
Subject RE: action mapping input
Date Mon, 28 Oct 2002 23:00:47 GMT
Okay, I misunderstood what John was saying and this is what I have:
1) forward "failure" is NOT the same as input which is required if
2) input CAN forward to a tiles definition.
I looked at the original post and realized that it was pretty ambiguous.
what i wanted to do (and it was successful)

      <action path="/siteSelect" type="SiteSelectAction"
name="siteSelectForm" validate="true" scope="request"
         <forward name="success" path=""/>

where was a tiles definition.


-----Original Message-----
From: Chen, Gin []
Sent: Friday, October 18, 2002 3:19 PM
To: 'Struts Users Mailing List'
Subject: RE: action mapping input

Okay, just to get this straight.
So I define a "failure" forward and it will behave the same as validation
error following the input tag?
No additional coding required?
Also, the reason that I wanted to use the input tag instead of another
forward is that I want to use the 1.1b2 method getInputForward(). It would
almost make sense that with the inclusion of this new method, the intent was
for it to behave as if it were looking up a forward or global.


-----Original Message-----
From: John Nicholas []
Sent: Friday, October 18, 2002 2:45 PM
To: Struts Users Mailing List
Subject: Re: action mapping input

Chen, Gin wrote:
> Hi all,
> 	I'm still new to struts and I cant find this in the documentation
> but, lets say that you have one of the struts-config from the docs.
>   <global-forwards type="org.apache.struts.action.ActionForward"/>
>     <forward name="logon" path="/logon.jsp" redirect="false" />
>   </global-forwards>
>   <action-mappings>
>     <action path="/logon" type="org.apache.struts.example.LogonAction"
> name="logonForm" scope="request" input="/logon.jsp" unknown="false"
> validate="true" />
>   </action-mappings>
>    Rather than have input="/logon.jsp" as in the snip can you have
> input="logon" and have it use the path from the global-forwards?
>    It just seems like it would make more sense since that means that you
> only have to change one location in case the location of the file ever has
> to change.

The input attribute is used when validation of the form bean fails. if 
the validation in the form bean (or the validator) fails the action is 
never run so it couldn't use the forward. The controller is returning 
you to the input page.

If a validation in the action fails (like a business logic failure)then 
you can use a "failure" forward.

John Nicholas

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

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

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

View raw message