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
validate="true"
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)
was:

      <action path="/siteSelect" type="SiteSelectAction"
name="siteSelectForm" validate="true" scope="request"
input="site.select.page">
         <forward name="success" path="site.select.global"/>
      </action>

where site.select.page was a tiles definition.

Thanks,
-Tim

-----Original Message-----
From: Chen, Gin [mailto:Gin_Chen@;tvratings.com]
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.
No?

-Tim

-----Original Message-----
From: John Nicholas [mailto:jakarta@;mobosplash.com]
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:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to