Have you set cookies="false" in the app's <Context> declaration? That'd do it.
What happens if you put a trivial test.jsp in webapps/ROOT and request http://www.yourserver.com/test.jsp? By default a JSP will create a session and you should get a JSESSIONID cookie. -- Len On Tue, Apr 22, 2008 at 7:28 PM, Timothy Washington <[EMAIL PROTECTED]> wrote: > Hello there - newbie question. I'm developing a browser-based application. I > i) copy the war file to the webapps/ directory, ii) startup tomcat and iii) > send an http request from Firefox. > > In my handling servlet, if a session doesn't exist for this client, then I > create one (via request.getSession(true)). I expect that cookie (and by > extension the session) to still be there on the next request. However, > tomcat's HTTP response to the first request does not include the JSESSIONID > cookie. So effectively my application is still only request scoped (tomcat is > creating a new session with each request). > > How can I get tomcat ( I've tried tomcat-5.5.25 and tomcat-6.0.16 ) to > reliably send the JSESSIONID cookie when a new session has been created? I > turned on Tomcat 6's RequestDumperValve, and got debugging info that > indicates that the JSESSIONID is being generated in the response. However, > when my browser receives the response, the cookie isn't there. > > > Tomcat's RequestDumperValve Log (on response) > END EchoServlet EV: <userSession xmlns='com/interrupt/bookkeeping/users' > id='686bbca4f757b9ab4bae280 > 3119786e7249-7ffb' groupid='webkell' userid='root' /> > Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: --------------------------------------------------------------- > Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: authType=null > Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: contentLength=95 > Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: contentType=null > Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: cookie=JSESSIONID=6014EF8C55BC4705D28863D117B1B334; > domain=null; path=/webkell > Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: header=Content-Length=95 > Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: header=Date=Tue, 22 Apr 2008 23:18:35 GMT > Apr 22, 2008 7:18:35 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: message=null > Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: remoteUser=null > Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: status=200 > Apr 22, 2008 7:18:36 PM org.apache.catalina.valves.RequestDumperValve invoke > INFO: =============================================================== > > > Firefox Request Headers (from LiveHTTPHeaders): > POST /webkell/webkell HTTP/1.1 > Host: localhost:8080 > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) > Gecko/20080404 Firefox/2.0.0.14 > Accept: > text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 > Accept-Language: en-us,en;q=0.5 > Accept-Encoding: gzip,deflate > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 > Keep-Alive: 300 > Referer: http://localhost:8080/webkell/ > Content-Type: application/x-www-form-urlencoded > Content-Length: 63 > > > Firefox Response Headers (from LiveHTTPHeaders): > HTTP/1.1 200 OK > Server: Apache-Coyote/1.1 > Content-Length: 95 > Date: Tue, 22 Apr 2008 23:18:35 GMT > > > Thanks for any help > Tim > > > > __________________________________________________________________ > Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your > favourite sites. Download it now at > http://ca.toolbar.yahoo.com. --------------------------------------------------------------------- To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
