This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSP and the fly likes setting a session variable in a 'href' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "setting a session variable in a Watch "setting a session variable in a New topic
Author

setting a session variable in a 'href'

farhath farook
Ranch Hand

Joined: Aug 01, 2007
Posts: 37
hi
i have a set of data that is displayed in a table in the JSP.
and when the hyper link on reach row is clicked i was to sent the object related to that row as value in the session( because i need that object in next to navigations.)
---------
the following code enables to pass parameters only
<c:forEach var ="report" items = "${pendingReports}">
<tr>
<td> ${report.reportname}</td>
<td> ${report.requestedDoctor}</td>
<td> ${report.requestedDate}</td>
<td> <a href= <c:url value ="Lab/UploadReport.jsp?report=${report}" /> >Upload</a></td>
</tr>
</c:forEach>
----------
can any one suggest the way how can i sent the session object on the fly according to the user selection..

thanks in advance
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

You need to communicate with the server to execute the code to set the scoped variable. You can submit a form, load a new request, or use Ajax.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting a session variable in a 'href'
 
Similar Threads
jstl mapped properties
Dynamic population of second list box based on selection of first
Pagination in jsp
JSP, beans and sharing ArrayLists
sql:query in jsp