I sympathize with your problem, Christoph. After a quick look over the code for the Coyote connector (which is likely what you're using), it looks like the answer is no: The session determination occurs in CoyoteRequest, and the cookies are unconditionally written with the context path of the request as the path value. Because the cookie handling is done in the internal Coyote request and response classes, and the CoyoteConnector is the only configurable element, I suspect that you'd have to re-implement some of the internals classes to change the behavior for assigning cookie domain or path.
Benjamin J. Armintor Systems Analyst ITS-Systems: Mainframe Group University of Texas - Austin tele: (512) 232-6562 email: [EMAIL PROTECTED] -----Original Message----- From: Christoph Meier [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 2:56 PM To: Tomcat Users List Subject: how to configure the cookie-path-argument Hi I'm runnig tomcat 5.19 behind an apache. apache is serving static contents and rewriting the requests (using mod_rewrite), for the rewrite-rules, see below. the web-app "/edit" has a Login-module, if login is successfull, the app "/edit" sends a cookie to the client with Path=/edit (the setting of the Cookie is done with theHttpServletReqest.getSession(true) ). The value for the Path-attribute by default seems to be /<appName> ... which for sure makes sense since the client is sending its request to e.g. http://edit.hmb.ch/ServiceBroker (or http://edit.hmb.ch/de.html ), but not sending to http://edit.hmb.ch/edit/ServiceBroker ... the client does send back the cookie in the Request-Header (since for the client it's not a Request to /edit ) .... in BEA-weblogic its possible to configure the path-attribute for the cookie for every web-app within the weblogic-specific weblogic.xml (see weblogic.xml - snippet below) is there a way to override tomcats default-behaviour for setting the path-argument of a cookie, e.g. in the web.xml or may be in the server.xml (in the context-section) ... ... or has someone another hint how to set the "Path=/" thanks in advance, christoph #---- weblogic.xml - snippet --------------------------------- <session-descriptor> <session-param> <param-name>CookieDomain</param-name> <param-value>myCookieDomain</param-value> <param-name>CookiePath</param-name> <param-value>/</param-value> </session-param> </session-descriptor> #---- EOF: weblogic.xml - snippet --------------------------------- #---- httpd.conf- snippet --------------------------------- <VirtualHost hmb.ch:80> ServerAdmin [EMAIL PROTECTED] DocumentRoot /home/hmb/htdocs ServerName www.hmb.ch ErrorLog /var/log/apache/hmb.ch-error.log CustomLog /var/log/apache/hmb.ch.log common RewriteEngine On # RewriteRule "^/(.*)\.(jpg|jpeg)$" "$0" [L] # RewriteRule "^/(.*)" "http://localhost:8080/edit/$1" [P] # ProxyPassReverse / http://localhost:8080/edit/ #RewriteRule ^/ http://localhost:8080/edit/index.html [L,P] RewriteRule ^/ServiceBroker(.*) http://localhost:8080/edit$0 [P] RewriteRule ^/(.*).html http://localhost:8080/edit$0 [P] </VirtualHost> #---- EOF: httpd.conf- snippet --------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
