File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes s:param struts 2 tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "s:param struts 2 tag" Watch "s:param struts 2 tag" New topic
Author

s:param struts 2 tag

saad rguig
Greenhorn

Joined: Aug 30, 2010
Posts: 1
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 ??
Pradeep Mittal
Greenhorn

Joined: Feb 23, 2009
Posts: 9
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 :-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: s:param struts 2 tag
 
Similar Threads
Problem With I18n feature of Struts2
hide the link in jsp
How to access a property attribute of a value outside of an iterate, but within another iterate
accesing value from list of string
passing form parameters such us textfield values using url tag