Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pass values thru html:link

 
ashwin deshpande
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I am trying to pass 1 parameter thru a html:link, this parameter is set in request scope before the jsp is called...in the page i print out the value of request.getParameter("parameterName"); and it shows up correctly...

i want to pass this parameter ahead when the user clicks on the link...

i tried to do this:
<html:link action='repeatSearch?search=<%=request.getParameter("search")%>' > Search Again </html:link>

but i dont think i can get that working...

is there anyway i could use a html:hidden text field and set that value ? i tried to do that, but was unsuccessfull,...i tried to do it with/without using <html:form> element, again no success.....

one other thing, this parameter is not part of the actionForm and i dont want to add it to the actionForm, just for this purpose....

thanks for reading all this...

ashwin
 
Kinjal Sonpal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ashwin deshpande:
<html:link action='repeatSearch?search=<%=request.getParameter("search")%>' > Search Again </html:link>
Try this. HTH.

Thanks and regards,
Kinjal Sonpal
 
ashwin deshpande
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the info...
will try it out...
right now i am using

<html:link action='myAction'
paramId="id"
paramName="beanName"
paramProperty="id" >
Edit Information ?
</html:link>

and i have a actionform with name beanName in my request scope and a property called 'id'....and its working fine....

dont want to mend it if its not broken...but will try the link elsewhere...

thanks again...

ashwin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic