tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarecsni János <jarecsni.ja...@mhc.hu>
Subject RE: altering the session cookie's path (Tomcat 4.0x): RESOLVED
Date Tue, 19 Feb 2002 06:32:51 GMT
Hi,

after some time I've found that the session cookie is set in the AJP
connector, namely in org.apache.ajp.tomcat4.AJP13Response (method
sendHeaders()). Actually to my surprise
o.a.c.connector.HttpResponseBase#sendHeaders() is called only when the first
resource is asked for (that's what I saw), it's not called thereafter any
more.

Now everything is working like charm. I have a few questions re this
solution:

1. since it's my modification of the tomcat code, naturally it will not be
present in any forthcoming tomcat versions - so I'll have to "patch" each
tomcat version before use (something I always tried to avoid)

2. where and how can I initiate that this modification (or a similar one) be
applied to the official tomcat source?

3. although my solution is merely an ad hoc one, I can think of a more
robust solution to the problem: this behavior of tomcat (what path it
generates in the session cookie) should be governed by some configuration
properties and not be hardwired in code (the current official code is not
flexible enough, since it always sets the path to be equivalent with the
application context if any).

Cheers,
János


|-----Original Message-----
|From: Jarecsni János [mailto:jarecsni.janos@morganhillconsulting.hu]
|Sent: Saturday, February 16, 2002 8:01 PM
|To: Tomcat Developers List
|Subject: altering the session cookie's path (Tomcat 4.0x)
|
|
|Hi,
|
|I wanted to alter Tomcat's default behavior for setting the JSESSIONID
|cookie. Tomcat normally sets the path of this cookie to be
|equivalent of the
|webcontext if any, otherwise it sets it to "/".

[...]

|
|I've run the application but was shocked to see that Catalina
|still sets the
|path to the webcontext... I've checked the source code and found only this
|class where the session cookie is manipulated:
|o.a.c.connector.HttpResponseBase (lines 642 sqq).
|
|Now I'm a bit puzzled about this... Does some of you see where I made a
|mistake?
|


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message