• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

s:param struts 2 tag

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am using the 2.2.1 strut 2 version.
when I try to pass some parameters using struts 2: only the first parameter is being passed to the action:
<s:url id="myLink" namespace="/" action="action1" >
<s:param name="id" >
<s:property value="%{server.getId()}" />
</s:param>
<s:param name="contextName" >
<s:property value="contextName" />
</s:param>
</s:url>

so am not getting the contextName
any ideas ??
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please add "includeparam" attribute to the URL and specify the name of the params which you want to pasa along with the URL.
Please try the below code.

<s:url id="myLink" namespace="/" action="action1" includeParams="id,contextName" >
<s:param name="id" >
<s:property value="%{server.getId()}" />
</s:param>
<s:param name="contextName" >
<s:property value="contextName" />
</s:param>
</s:url>

Hope this wil help :-)
 
reply
    Bookmark Topic Watch Topic
  • New Topic