Rick,
I'm pretty sure that this is the same issue that I've experienced.
First, try mapping to /bodypainting/ instead of /. See if you get a
cookie there. Then, if you have a browser that allows you to inspect
session cookies (mozilla is good for this), check the path of your
session cookie. You should find that it's /bodypainting. The problem
is that the cookie path is determined by Tomcat, not by Apache, and
Tomcat gives every webapp a cookie with the path of the webapp as tomcat
would determine it; so since Tomcat thinks the path is /bodypainting,
the cookie path doesn't change just because you're using mod_proxy. So
when you go to visit the page at /, the cookie is ignored because it
doesn't have the right path.
The only way I can think of to solve your issue so far is to solve the
path issue with Tomcat- you need to map your webapp to
'http://localhost:8000/' instead of
'http://localhost:8000/bodypainting/'. There are two ways I can think of
to do this:
1. move your 'bodypainting' webapp into the ROOT webapp.
2. Uncomment and change the docBase path in server.xml: Context
path= docBase=bodypainting debug=0/
That should do the trick, hopefully. Let me know how that works for you.
Best of luck!
Liam Morley
Rick Mills wrote:
Hi
I am experiencing a problem with session tracking when using Apache 2.0.39's
mod_proxy module to connect to my Tomcat 4.0.3 instance.
I have a servlet which checks to see if a session exists, and if not,
creates a new session.
When testing on a standalone instance of Tomcat, all works as expected. I
start up a browser session to my site, and the servlet creates a new
session; this session persists for subsequent requests to my site.
However, when going via Apache to Tomcat over mod_proxy, my servlet is not
recognising that I have already set up a session on subsequent calls to
Tomcat, and is creating a new session each time.
The Virtual Host configuration in Apache's httpd.conf to set up the proxy
connection to Tomcat is as follows:
Virtual Host *
ServerNamewww.bodypainting.co.uk
ProxyPass/ http://localhost:8000/bodypainting/
ProxyPassReverse / http://localhost:8000/bodypainting/
/VirtualHost
The entry in my Tomcat server.xml for handling the proxy connection is as
follows:
Connector className=org.apache.catalina.connector.http.HttpConnector
port=8000 minProcessors=3 maxProcessors=75
proxyName=localhost:8000 proxyPort=80/
Just wondered if anyone else had experienced anything similar, or if anyone
has any ideas.
Incidentally, I've already experimented with using mod_jk and mod_webapp to
connect Apache to Tomcat, but found that mod_proxy was by far the simplest
method, especially given that all content from my site will be served up by
Tomcat, and I don't need any static pages served up by Apache.
Kind regards
Rick Mills
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]