| Summary: | org.eclipse.jetty.server.session.AbstractSessionManager.setSessionPath() is missing | ||
|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Bob Obringer <bobringer> |
| Component: | documentation | Assignee: | Jan Bartel <janb> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | janb, jetty-inbox |
| Version: | unspecified | ||
| Target Milestone: | 7.5.x | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Hi Bob, This probably needs more documentation (I'll try and add something to the wiki), but in Servlet 3.0 api, there is now the javax.servlet.SessionCookieConfig class: http://download.oracle.com/javaee/6/api/javax/servlet/SessionCookieConfig.html You set domain, path etc up on that object instead. You retrieve it from your jetty SessionManager and then call its setters. From inside your servlet, you can also retrieve it from your ServletContext. Shirley, We need a page on the wiki about generally how to configure sessions, which should act as an introduction to the session clustering pages (just different specific ways of configuring sessions). For jetty-8, there are new ways to configure the sessions, based on new Servlet Specification 3.0 apis (see below/above re SessionCookieConfiguration). thanks Jan Jan,
Outstanding. Thanks for the quick turnaround.
I've got this working already, couldn't have been easier. Original code was:
JDBCSessionManager sessionManager = new JDBCSessionManager();
sessionManager.setSessionCookie("customcookiename");
sessionManager.setSessionPath("/");
---------------------
New code is:
JDBCSessionManager sessionManager = new JDBCSessionManager();
SessionCookieConfig sessionCookie = sessionManager.getSessionCookieConfig();
sessionCookie.setName("customcookiename");
sessionCookie.setPath("/");
Updated jetty docs with servlet 3.0 api for session config. Jan |
Build Identifier: 8.0.4.v20111024 In 8.0.2, I'm able to call setSessionPath("/") to cause the session cookie to be set at the root. 8.0.4 removes setSessionPath() Is that intentional? Is there now another way to do it? AFAIK, it was not deprecated, so... I'm stuck on 8.0.2 unless I want to extend and add setSessionPath() back in. Reproducible: Always