Hello,
In order to share object from one servlet to another use getServletContext()
provided by the GenericServlet Class. Then use getAttribute() from this
context
to retrieve the object. (setAttribute() is used on the other hand to share
an
object within a context)
Here is a code snippet:
ServletContext context = getServletContext();
ConnectionPool pool =
(ConnectionPool)context.getAttribute("CONNECTION_POOL");
Pascal Deschenes
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> Lallement
> Sent: April 12, 2000 10:53 AM
> To: [EMAIL PROTECTED]
> Subject: HttpSessionContext
>
>
> In my application, I'd like to use HttpSessionContext to share
> data between
> servlets.
> But HttpSession is deprecated with no replacement.
> How can I replace it ?
>
> tx
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html