You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Shade, Christopher" <Ch...@247media.com> on 2000/08/23 22:56:52 UTC
more on session handling
it's me again, with the same problem. but i'm able to articulate it a
little better. if this is a bug, please let me know how to log it (not
getting a server response on znutar.cortexity.com:8888).
using Tomcat 3.1 as stand-alone, i have JSPs in a /whsp context, defined in
server.xml. yet i forced the context path to root in
SessionInterceptor.beforeBody() because i want to have the same cookie
(context) path for the JSPs and the servlets they invoke. i did this
because i realized a while ago that when i invoked a servlet, it had a root
cookie path, while the JSP had a /whsp cookie path...i thought this was why
i couldn't share a session between the JSP and servlet. it was probably one
reason why not, but i'm surprised to find it's still creating a session when
the servlet is invoked (i used the SessionInterceptor debugging, and
examined the cookies and saw that they do have the same path of root).
is it possible that tomcat is creating a new context when invoking a
servlet, even though the cookie path is the same as the JSPs? shouldn't
tomcat find the JSP's session ID in the invoked servlet's context since they
have the same cookie path...it seems like it doesn't find it, so it
generates a new session...isn't this a bug? shouldn't the same session be
found for the JSP and servlet if they both have a cookie (context) path of
root?
another note is that in my JSP's i do use the session = true page directive.
also i tried the 3.2 milestone build and saw that the same thing was
happening.
thanks for any advice,
...Christopher
_____
Christopher X. Shade
Senior Software Engineer, 24/7 Mail
Sun Certified Programmer for the JavaTM 2 Platform
24/7 Media Inc. (NASDAQ: TFSM)
717 17th Street, Suite 500
Denver, CO 80202
tel) 303.942.4653
fax) 303.675.2389
Company vision: To be the preeminent global provider of interactive
marketing solutions and services.
http://www.247media.com <http://www.exactis.com/>