• 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

Specifying Request Parameter in [html:link]

 
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to attach a single parameter with a literal value to html:link. But it seems that I need to create a bean to store the value and give the name of that bean to the paramName attribute. Can we just simply type a literal String value in the html:link tag? It doesn't make sense to go through a big circle in order to do such a simple task?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could simply specify the parameter like this:

<html:link page="/myAction.do?parm1=foo" >click here</html:link>

If you still want to use the other method, it really isn't that hard:

<bean:define id="fooString" value="foo" />
<html:link action="myAction" paramId="parm1" paramName="fooString" >click here</html:link>
[ October 07, 2006: Message edited by: Merrill Higginson ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic