Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 66301 invoked from network); 19 Feb 2002 06:33:15 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 19 Feb 2002 06:33:15 -0000 Received: (qmail 28065 invoked by uid 97); 19 Feb 2002 06:33:19 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@jakarta.apache.org Received: (qmail 28049 invoked by uid 97); 19 Feb 2002 06:33:18 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 28037 invoked from network); 19 Feb 2002 06:33:18 -0000 From: =?iso-8859-2?Q?Jarecsni_J=E1nos?= To: "Tomcat Developers List" Subject: RE: altering the session cookie's path (Tomcat 4.0x): RESOLVED Date: Tue, 19 Feb 2002 07:32:51 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: