What if you just put the information in the application object
instead? You could stick the data in an object and store it in the
application object using the session ID as the key. For best results,
create an object that implements HttpSessionBindingLIstener so it can
remove itself from the application object when the session goes away
(obviously, you'd have to store the object in the session in order to
receive the unbind event).

You could probably get away with storing the sessions themselves in the
application object, but that may not work for all servers and it may
impose additional risks. You'd also have the problem of trying to clean up
dead sessions.
   Mark

On Wed, 29 Nov 2000, Ismael Blesa Part wrote:

> Is possible to access an HttpSession with its ID from another session ?
> I have an application and I need to pass some information from one
> session to another. Then I send the sessionID to a JSP where I want to
> get access to the two sessions, the created session and the session
> associated with the given ID.
>
> Is it possible with servlet 2.2 ?
>
> With servlet 2.1 it was possible, but the class used has been
> deprecated.
>
>
> Best regards,
> Ismael
>

--

Mark Wutka
Author of Special Edition Using Java Server Pages & Servlets (ISBN: 0789724413)

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to