RequestAware gives you access to the Request Attribute map, not the
Parameter map.  You can use ParameterAware to get the Map of Parameters or
ServletRequestAware to get access to the HttpServletRequest directly.  But
the best way to get access to values from forms or query strings is to allow
Struts to inject the values into you action automatically.  By default if
you have:

<input type="text" name="fieldOne"/>

in your HTML, Struts will look for and call

public void setFieldOne (String fieldOne) {
  // do something with the value
}

automatically for you.
  (*Chris*)

On Tue, Aug 4, 2009 at 11:00 AM, Kawczynski, David <
david_kawczyn...@merck.com> wrote:

> Implement the requestAware interface to have access to a Map containing
> request parameters as name-value pairs.
> In terms of an html tag, use OGNL to get to the request parameters.
> Especially the #request object.  EG %{#request.someParam}
>
> > -----Original Message-----
> > From: Bhaarat Sharma [mailto:bhaara...@gmail.com]
> > Sent: Tuesday, August 04, 2009 1:56 PM
> > To: Struts Users Mailing List
> > Subject: equivalent of request.getParameter();
> >
> > In servlets we can do request.getParameter("someParm"); to
> > gain access to
> > parameters passed to the jsp.
> > what is the equivalent of this in struts2?
> >
> > is there an html tag for this?
> >
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or
> MSD and in Japan, as Banyu - direct contact information for affiliates is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and
> then delete it from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

Reply via email to