Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass parameters inside html:link tag

 
shah rah
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • 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
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • 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 ]
 
omkar patkar
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic