It's possible. However as the DTD says, the input is:
Module-relative path of the action or other resource
to which control should be returned if a validation
error is encountered.
And not (necessarily) where you came from.
Sri
-----Original Message-----
From: Michael Mattox [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 11:42 AM
To: Struts Users Mailing List
Subject: RE: Why do we need the input property of action in the struts-config.xml file
Sounds like a good approach, but wouldn't it be easier if action's input was
automatically set? Is this not possible?
Thanks,
Michael
> -----Original Message-----
> From: David Graham [mailto:[EMAIL PROTECTED]]
> Sent: mercredi 19 f�vrier 2003 17:37
> To: [EMAIL PROTECTED]
> Subject: Re: Why do we need the input property of action in the
> struts-config.xml file
>
>
> You can reuse the Action by defining it with a different "path"
> attribute. The input is just for the Action on one path, not every
> path you use that action on.
>
> David
>
>
>
> >From: "Mike Mattox" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List"
> ><[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Why do we need the input property of action in the
> >struts-config.xml file
> >Date: Wed, 19 Feb 2003 17:05:36 +0100
> >
> >Looking at the struts-config.xml from the struts-example app:
> >
> > <!-- Save user registration -->
> > <action path="/saveRegistration"
> >
> >type="org.apache.struts.webapp.example.SaveRegistrationAction"
> > name="registrationForm"
> > scope="request"
> > input="registration"/>
> >
> >I'm confused about the input parameter. Why do we need to specify
> >the input? Doesn't the Action know which page the user came from?
> The reason
> >I
> >ask is because this ties the Action to a specific page, which
> >prevents reuse. Let's say I have an action that I want to be used by
> >multiple JSP's, and inside the action if there's an error it should
> >return to
> the previous
> >page. Is there an easy way to use the same action twice?
> >
> >Thanks,
> >Michael
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]