If I understand correctly, you have all the ticket details loaded in your first jsp and you create links out of them. Each link carries the ticket id and is linked to ticketdetails.jsp. In ticketdetails.jsp, you attempt to retrieve the bean set by the first rqeuest process for display. Atleast this is what you have set out to achieve ?
However there are several problems with your code (& your design).
1. In your first jsp, you have only created links (using the ticket ids from the bean). You have not set the bean in session scope.
2. Assuming you do (1) above, you would have a set of ticket beans set in session scope. Then when the ticketdetails.jsp is loaded, it will have to know exactly which is the bean (remember the previous jsp set one bean in session scope for each ticket) it has to extract from session scope.
3. What's this enumeration in your first jsp ? Where does it come from ? Does the process which set up this enumeration of ticketbeans in your first jsp also set them in session scope ?
4. One way to work around (2) above is as follows. In the first jsp, when the ticket beans are actually set in scope, set the value of the "id" attribute as the ticketId. Thus when ticketdetails.jsp is requested with a particular ticketid (for this you will have to append the ticketId with each query
string), all it has to do is lookup the session scope for a bean whose "id" attribute is the incoming request parameter "ticketId" . There is a catch however. You may not be able to use useBeans because as far as i know, it does not allow runtime expressions for the "id" attribute". You could use jstl el or plain old scriptlets.
Hope this helps.
cheers,
ram.