• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

How to pass a data through html:link in struts

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
friends
I am working in struts frame work and i have to pass a data through the struts tag <html:link> as we do in HTML. The corresponding code in HTML will be like as follows

<a href='/LibraryManagement/StaffEditMember2.jsp?id=108>Edit</a>

On the target page we get the value of id using request.getParameter(id)

How can i replace <a> with <html:link>

Please help me
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this thread to the Web Application Frameworks forum, since it is about Struts.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Abhilash AT:
friends
I am working in struts frame work and i have to pass a data through the struts tag <html:link> as we do in HTML. The corresponding code in HTML will be like as follows

<a href='/LibraryManagement/StaffEditMember2.jsp?id=108>Edit</a>

On the target page we get the value of id using request.getParameter(id)

How can i replace <a> with <html:link>

Please help me



Try this:

<html:link href="/LibraryManagement/StaffEditMember2.jsp" paramId="id" paramName="id" paramScope="request">Edit</html:link>

You can also use paramName in conjunction with paramProperty if the value you want is contained within a bean rather than the request.

I hope this helps -

Suzanne Israel
SCJP 1.4
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic