This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
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


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
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
Author

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?

JSP:



Action:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 63340
    
  70

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


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

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


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


may i know why you are using the above section?

regards,
kishore
David Newton
Author
Rancher

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: http://aspose.com/file-tools
 
subject: Attempting to get a parameter from a link
 
It's not a secret anymore!