I haven't used it, so I could be wrong, but I would imagine that there
are instances where you don't want to have a getter/setter for each
parameter. Such as when you may be creating parameters on the fly based
on some other criteria. Most of the time, you should be able to stick to
the getters/setters. If a time comes that your request processing
doesn't fit into that model, then implement parameteraware.

-Wes



> -----Original Message-----
> From: Cory D. Wiles [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 24, 2007 3:47 PM
> To: Struts Users Mailing List
> Subject: Re: Accessing Request Parameters from Action (Newbie 
> Question)
> 
> Thank you for the quick response.
> 
> What is the purpose of implementing the Parameters Interceptor then?
> 
> http://struts.apache.org/2.x/docs/how-can-we-access-request-pa
> rameters-passed-into-an-action.html
> 
> Map parameters = this.getParameters();
> 
> Thanks,
> Cory
> 
> On 9/24/07, Wesley Wannemacher <[EMAIL PROTECTED]> wrote:
> >
> > Make sure that the class that you have mapped to 'steptwo' has a 
> > getter/setter for "previousaction"
> >
> > Then, in your execute method (or whichever method you may 
> have mapped 
> > in your struts.xml file), you should be able to retrieve the values 
> > because the setter(s) are called beforehand.
> >
> > There are a few tutorials available online (including my own at
> > http://www.wantii.com/wordpress/?cat=3)
> >
> > -W
> >
> > > -----Original Message-----
> > > From: Cory D. Wiles [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, September 24, 2007 3:30 PM
> > > To: Struts Users Mailing List
> > > Subject: Accessing Request Parameters from Action (Newbie 
> Question)
> > >
> > > What is considered the best practice for accessing request 
> > > parameters inside of an action?
> > >
> > > For example if I have a URL:
> > > steptwo.action?previousaction=index.action then how do I access 
> > > "previous action"?
> > >
> > > Thanks,
> > > Cory
> > >
> >
> > 
> ---------------------------------------------------------------------
> > 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]

Reply via email to