• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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
reply
    Bookmark Topic Watch Topic
  • New Topic