tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Problem with sessions on a fedora 10 machine
Date Thu, 26 Feb 2009 18:07:23 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Noam,

On 2/24/2009 5:22 PM, Noam Aigerman wrote:
> Hi Chris, 
> I managed to isolate the issue - you were close with your last guess
> :) - in proxy_ajp.conf I mapped my webapp by doing:
>
> ProxyPass / ajp://localhost:8009/Noam
>
> So whoever comes to my site can go to www.site.com and not
> www.site.com/Noam
>
> I am guessing the cookies are set to a wrong domain. What should I
> do? And is this kind of mapping the wrong way to do it in the first place?

So, your webapp thinks that the context path is "/Noam" instead of "/".
The cookie will be set to "host=www.site.com, path=/Noam". When your
browser sends further requests "to /", the cookie is not included
because the path doesn't match.

You can do one of two things:

1) Tell Tomcat to use an "empty session path" on your connector
   (see http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
    or  http://tomcat.apache.org/tomcat-5.5-doc/config/http.html)

2) Deploy your application under the ROOT context instead (use ROOT.war
   or webapps/ROOT directory for deployment).

I favor #2 because then you won't forget that you have server-wide
configuration supporting a single webapp.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmm2lsACgkQ9CaO5/Lv0PBATACcCMwYGrFrTH2gE+v5PopabGPV
CDcAoLUQG/uOi8jDJv3/EFQIoTCnrioh
=6PFj
-----END PGP SIGNATURE-----

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


Mime
View raw message