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: [EMAIL PROTECTED]




----- Original Message ----- From: "Grzegorz Stasica" <[EMAIL PROTECTED]>
To: <user@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: [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