On Fri, 9 Mar 2001, Richard Yumul wrote:

> Actually, that helps considerably; Is that part of the servlet spec,
> or is that just a feature of Tomcat?

Not sure exactly.  I think it has to at least be partly part of the
spec, because getContext() is part of the API.  But I don't know
exactly what the spec has to say about it (of course, you can go read
the spec, it's available at sun, and relatively easy reading, as these
things go :-).

Also, Tomcat is supposed to be the reference implementation of the
spec, so you'd think they'd stick to it pretty closely.


> I guess what I really am asking is it possible to share the
> HttpSession object between web apps?

Not really sure on this -- I think there may be some complications in
trying to do this.  I have seen some discussion of this on another
servlet-related list I'm on -- servlet-interest, run by Sun.  You
might check there -- you can access the archives from:

http://archives.java.sun.com/archives/servlet-interest.html


> -----Original Message-----
> From: Milt Epstein [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 9:59 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: multiple *.WAR's working together?
> 
> 
> On Fri, 9 Mar 2001, Richard Yumul wrote:
> 
> > Hi all -
> > I've been playing with servlets for over a year or so now, and one of the
> > drawback's I've encountered is the ability for separate WAR's to
> communicate
> > w/ each other. For example, say I have two WAR's: one that handles logging
> > in (after a successful login, it puts user info in a HttpSession), and one
> > which handles a simple form submission. The URL's would be deployed
> > something like (in TOMCAT):
> >
> > <webapps>/login
> > <webapps>/form
> >
> > Now, is there any way for the 'form' app too access the user info from the
> > 'login' context?  I know they're in separate ServletContext's, but this
> > doesn't seem like an unreasonable functionality to ask for.  Or, if
> there's
> > any workaround, or alternate method to achieve this type of functionality
> > I'd very much appreciate it if somebody would enlighten me.
> >
> > The only option that I see, if I want multiple app's talking to each other
> > (like a calendar, message board, or news feed, for example) would be to
> > bundle them all in one WAR.  Thus you can't deploy the individual app's
> > separately.
> >
> > If I'm missing the bigger picture, somebody please enlighten me. :)
> 
> Thought off the top of my head: Will crossContext help with this?
> That's a property of contexts that you set up in server.xml.
> According to the comments there:
> 
>    ... crossContext=true (allows you to access other contexts via
>    ServletContext.getContext())
> 
> Milt Epstein
> Research Programmer
> Software/Systems Development Group
> Computing and Communications Services Office (CCSO)
> University of Illinois at Urbana-Champaign (UIUC)
> [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
> 

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to