I think the spec. makes this possible...(provided the both the
applications(context) are on the same container and the same JVM)

First obtain the context of the other application
 ServletContext rt = getServletContext().getContext("/jack/");

then set the session as an attribute in the context of other application
      rt.setAttribute("session",session);

Then the session object will be available in the other context........

Any comments are welcome!!

----- Original Message -----


From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 17, 2000 9:55 PM
Subject: Re: Cross context sessions


> Cheong Takhoe wrote:
>
> > Hi,
> >
> > How do we maintain sessions across context on the server?
> >
>
> You don't.  Sessions are specific to a particular web application (i.e. a
> particular ServletContext), as described in the servlet specification.
>
> If you want to share information between contexts (on the same server or
different
> servers), you need to use some external mechanism such as databases, EJBs,
> directory servers, shared files, and so on.
>
> >
> > regards,
> > Cheong Takhoe
> >
>
> Craig McClanahan
>
> ====================
> See you at ApacheCon Europe <http://www.apachecon.com>!
> Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
> Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
>                                     Applications to Tomcat
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> 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
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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