struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <rosenberg.l...@googlemail.com>
Subject Re: How to carry parameters to action: login.do?action=add&id=123
Date Sun, 04 Jun 2006 11:29:00 GMT
On 6/4/06, M.Liang Liu <patriotlml@gmail.com> wrote:
> I just want to  carry parameters to action :login.do
> I will make use of  the url   .../login.do?action=add&id=123 in the other
> page as a link.
> And I want  to get those parameters using: request.getAttribute("action");
>
> request.getAttribute("id");
> to get them.
>
> However,it does NOT work.

Actually it does. Only that it is called PARAMETER not Attribute.
req.getParameter("action");
Attibute is something you've put into the request scope during processing.
Parameters of the url are retrieved with getParameter("name");.

regards
Leon


>
> I would like to know can I use a url like  .../login.do?action=add&id=123
>
> If not,how can I carry two parameters to an action?
>
> Thank you.
>
> --
> Why Signature?
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message