tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 2smart4u <rc4...@googlemail.com>
Subject Re: Always load balance to same box with different tomcat contexts
Date Fri, 19 Mar 2010 10:50:39 GMT
On Fri, Mar 19, 2010 at 11:05 AM, Andrey Ilyin <andrey.ilyin@db.com> wrote:
>
>
> Does this mean that session/servletContext is shared between contexts? E.g.
> if I have some attribute in session/application contexts in webapp1 would it
> be accesible in webapp2?
>

when the context is dropped from a Cookie-path, the cookie is valid
for any context on that host

> So my understanding how it works:
>
> 1) There is no cookie in browser - it will loadbalance to any engine

you'll loose the session without a cookie, unless you're using
url-rewriting to store the session-information.
best practise is to use a cookie, though

> 2) There is cookie in browser - it will loadbalance to engine which already
> has session - since cookie has no context path

nope. actually the cookie can now be shared between various contexts
on the same engine (machine).
when having multiple instances of tomcat running where you want to
share the session-information, IMHO you'll need to setup a
tomcat-cluster.

hth

gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message