RE: Why do we need the input property of action in the struts-config.xml file

2003-02-19 Thread Sri Sankaran
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:
> >
> > 
> >  >
> >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]




RE: Why do we need the input property of action in the struts-config.xml file

2003-02-19 Thread David Graham
How would it know what it's input resource is?  Keep in mind that you can 
list a tiles definition in the input attribute so it's not as easy as 
checking a url.

David



From: "Michael Mattox" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: Why do we need the input property of action in the 
struts-config.xml file
Date: Wed, 19 Feb 2003 17:41:52 +0100

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:
> >
> > 
> > 
> >
> >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]


_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Why do we need the input property of action in the struts-config.xml file

2003-02-19 Thread Michael Mattox
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:
> >
> > 
> >  >
> >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]




Re: Why do we need the input property of action in the struts-config.xml file

2003-02-19 Thread David Graham
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:




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]



Why do we need the input property of action in the struts-config.xml file

2003-02-19 Thread Mike Mattox
Looking at the struts-config.xml from the struts-example app:




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]