• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

How to pass parameters inside html:link tag

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to pass parameters inside html:link tag as follows
/test/SearchPage.do?action=m1
/test/SearchPage.do?action=f1
/test/SearchPage.do?action=g1

here is my index.jsp
html:link action = "/test/SearchPage.do" link1 html:link
html:link action = "/test/SearchPage.do" link2 html:link
html:link action = "/test/SearchPage.do" link3 html:link
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Probably the simplest option would be to use the page attribute of the <html:link> tag instead of the action attribute. Example:

For more options, see the Struts taglib documentation. Read the section under the heading "link".
[ March 08, 2007: Message edited by: Merrill Higginson ]
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shah,

U can use the param attributs to pass parameters in the <html:link> tags :-

paramName ="<name-of-the-form-bean-whose-property-you-want-to-use>"
paramId ="<name-of-the-parameter>" .... in your case it will be paramId="action"
paramProperty="<value-of-the-parameter-which-is-actually-the-value-of-the-property-of-the-form-bean-uhave-specified-above>"

Thanks
Omkar Patkar
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic