wood burning stoves 2.0*
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
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: 60822
    
  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]
 
 
subject: setting a session variable in a 'href'
 
Similar Threads
Dynamic population of second list box based on selection of first
JSP, beans and sharing ArrayLists
sql:query in jsp
jstl mapped properties
Pagination in jsp