tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: virual domain problems.
Date Tue, 11 Sep 2001 15:26:33 GMT

On Tue, 11 Sep 2001, naveen wrote:

> Date: Tue, 11 Sep 2001 14:51:14 +0900
> From: naveen <>
> Reply-To:
> To:
> Subject: virual domain problems.
> hi,
> I have configured the DNS server which will direct all the virtual hosts of
> my domain to my web server.
>   The problem  is , when I am using virtual host to access my server, I
> loose all my session variables when I pass from one page to another.
> Should I configure virtual host parameter in tomcat also.
> I am using Tomcat and apache on Redhat machine.
> thanks

Web applications do *not* cross virtual host boundaries (even if you are
using the same context path and the same document root for each host).
Therefore, the sessions do not cross over either.  See the servlet spec:

(in 2.3, for example, see section 3.6).

You will need to use some other mechanism to share information across your
virtual hosts.  One approach might be to use a cookie that identifies a
database entry that contains the information you want to share.

Craig McClanahan

View raw message