• 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

using html:link to pass parameter

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I wanted to use <html:link>
where user clicks on the link and an actiod would be called and would recieve a parameter
Here is what my <html:link> looks like (ViewTeamUpdates.jsp):


The attribute TEAMUPATESLIST is a request Attribute which holds an ArrayList of 'teamUpdate' which has msg_id property.

if i use only:

i do get the value of the msg id
but when used in conjunction with <html:link> it gives me following error:


which the row and column are near the paramName attribute.

Could somebody tell me what am i doing wrong.?

-Thanks
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem here is that you can't use one custom tag as an attribute for another as you're attempting to do by using a bean:write tag for an attribute of an html:link tag.

In this case you can do what you need to do quite easily without embedding tags. Just use a combination of the paramName and paramProperty attributes instead of the paramValue attribute. Example:

[ March 07, 2008: Message edited by: Merrill Higginson ]
 
prakash chauhan
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Merrill
Thanks for the solution ,
its working now..
i was using it that way because i had seen it working in conjuction with
<a href="/edit.do?msgId=<bean:write...../>"></a> tag and was working on that lines..
I do appreicate your help.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am struggling with a similar problem.

I am able to call my action file like this
<html:link action="/downloadMyFile" >Click Here</html:link>

I tried your way that you have discussed but i am struggling how to pass parameters values to my action class.

It will be great if you can send your sample jsp.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Post your code along with a description of the problem, error messages, etc., and we'll help you debug it.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic