Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing parameter through html link tag

 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am working on a jsp page that uses struts html:link tag. The code is given below

<html:link paramName="results" paramId="oid"
paramProperty="location.locationId"
page="/addressMaintenance.do?requestAction=fetchLocationById">
<global:r911PhoneNumber name="results" property="phone" />  


</html:link>

I want to be able to pass another parameter called "fromSessionDetails" with the value true and want this variable and value available in my action class. How can I send a second parameter. the first one I am recieving there is oid.

Thanks
Imad
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64835
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone please help??
Thanks
 
pankajjj jain
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use it
<html:link action="targetname" name="collectionname" property="item" />

where name denotes a collection of item you want to send
 
Stefan Evans
Bartender
Posts: 1717
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<html:link action="targetname" name="collectionname" property="item" />

this "collectionname" must be a Map of name/value pairs to send with the request.

eg


http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-html.html#link
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

(struts 1.x)

is it possible to do this via xml, like a PARAM tag, instead of scriplet?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic