You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Suriyanarayanan, Senthil Kumar" <se...@capitalone.com> on 2001/09/19 02:56:27 UTC

How to use 'parameter' attribute of the action tag.?

Hello,
	How do I use the parameter attribute of the action tag. The
struts-config_1_0.dtd says, action tag takes
parameter attribute as..

     parameter       General purpose configuration parameter that can be
used
                     to pass extra information to the Action selected by
this
                     mapping.

	I would like to how to mention in struts-config.xml and refer it in
the perform method of the action.

	Any help would be appreciated.

Thanks
Senthil Kumar.S
 
**************************************************************************
The Information transmitted herewith is sensitive information intended only
for use to the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon, this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.

Re: How to use 'parameter' attribute of the action tag.?

Posted by Ted Husted <ar...@jab.org>.
The mapping is passed to perform(), so you can access the parameter like
this:

String parameter = mapping.getParameter();

To pass multiple parameters, you could set it up like a query string
(p1=this&p2=that), and then use 

Hashtable parameters =
HttpUtils.parseQueryString(mapping.getParameter());

to get them out.

http://java.sun.com/j2ee/j2sdkee/techdocs/api/javax/servlet/http/HttpUtils.html

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/


"Suriyanarayanan, Senthil Kumar" wrote:
> 
> Hello,
>         How do I use the parameter attribute of the action tag. The
> struts-config_1_0.dtd says, action tag takes
> parameter attribute as..
> 
>      parameter       General purpose configuration parameter that can be
> used
>                      to pass extra information to the Action selected by
> this
>                      mapping.
> 
>         I would like to how to mention in struts-config.xml and refer it in
> the perform method of the action.
> 
>         Any help would be appreciated.
> 
> Thanks
> Senthil Kumar.S