You can also leverage the input attribute in an action by returning the following from perform/execute:
new ActionForward(mapping.getInput()) Quoting John Nicholas <[EMAIL PROTECTED]>: > 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> -- Kris Schneider <mailto:kris@;dotech.com> D.O.Tech <http://www.dotech.com/> -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>