Posted by James Mitchell <jm...@apache.org>.
No need for a scriptlet if you can use JSTL.
Do this:
<jsp:useBean id="linkParams" class="java.util.HashMap"/>
<c:set target="${linkParams}" property="id" value="${bean.userId}"/>
<c:set target="${linkParams}" property="view" value="summary"/>
...then use it in your link tag...
<html:link action="/foo" name="linkParams">Go to foo></html:link>
...renders like this...
<a href="/myapp/foo.do?id=45&view=summary">Go to foo</a>
--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM: jmitchtx
Yahoo: jmitchtx
MSN: jmitchell@apache.org
----- Original Message -----
From: "Grzegorz Stasica" <gs...@poczta.onet.pl>
To: <us...@struts.apache.org>
Sent: Wednesday, May 18, 2005 4:47 PM
Subject: multiple params in <html:link...
> hi,
>
> Is there a easy way to have more than one param attached to strut's
> <html:link forward ..>
> I know that there is a soultion with HashMap, but in case I just need to
> attache additional param to already exsisting in some bean I'm bound
> to use scriplet to create a hashmap.
>
> Rgs
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org