This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSP and the fly likes Determing what list item got clicked Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Determing what list item got clicked" Watch "Determing what list item got clicked" New topic
Author

Determing what list item got clicked

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1064
How can you send to the next JSP page information about which item in a list was clicked on in the last JSP page?
I don't see how to use the loop variable that creates the list, because this variable is already wrong from putting the entire list on the form (has the value of the number of list items, not the one clicked on).
I don't see how to set a session attribute here (or how it would help) since the loop goes through and puts the list up on the screen before the user can click a list item.
What I want to do, ideally, is to pass to the next JSP page part of the hyperlink text of the link clicked on in the previous page. That way, I could parse the string and figure out exactly what was clicked.
Is there a simple (any?) way to do this?
Thanks much in advance.
-- Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Determing what list item got clicked