________________________________
From: Wim De Smet <krom...@gmail.com>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Mon, October 12, 2009 2:23:29 AM
Subject: using a map of parameters with the s:url tag

Hi all,

I'm using struts 2.1.x. Given a Map<String,String> called parameters I
want to construct an URL as follows:
<s:url id="testUrl" action="test">
  <s:iterator value="parameters">
    <s:param name="%{key}" value="value" />
  </s:iterator>
</s:url>

Unfortunately the nested iterator seems to hide the parameter tag from
the enveloping url tag? I've verified that it's indeed iterating and
that the entrySet is available with the two values, key and value. But
I can't seem to use this to construct the URL. Is there no way to do
this? Maybe a workaround?

regards,
Wim

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


Hi Wim,

Did you want to generate a new URL including all the current parameters?

http://struts.apache.org/2.1.8/docs/url.html

<s:url id="testUrl" action="test" includeParams="true" />

Regards,
Tommy

Reply via email to