File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Attempting to get a parameter from a link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Attempting to get a parameter from a link" Watch "Attempting to get a parameter from a link" New topic

Attempting to get a parameter from a link

Gustavo Santos
Ranch Hand

Joined: Jan 22, 2009
Posts: 40
Hello there,

I have a JSP that lists some values and turn them into a link, and each link has its own value... but the problem is that I'm attempting to get the value of the link that has been clicked, but unfortunately I get the value of the last link that has been listed on the forEach loop... does anybody know how can I get that value by passing it to either a parameter or an attribute?



Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63868

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.

[Asking smart questions] [About Bear] [Books by Bear]
a kishore
Ranch Hand

Joined: Sep 16, 2009
Posts: 82
Hi Gustavo,

<td bgcolor="#817339" width="15"></td>
<td><html:link href="javascript:;" onclick="$('methodsForm').submit();">All</html:link></td>

may i know why you are using the above section?

David Newton

Joined: Sep 29, 2008
Posts: 12617

What do you mean when you say "each link has its own value"? Each link is the same, and simply submits the form.
I agree. Here's the link:
subject: Attempting to get a parameter from a link
It's not a secret anymore!