You probably want to get hold of the ServletContextImpl and call
getSession, the correct implementation of SessionConfig to use will
depend on the configuration of the servlet deployment (and in general
SSL is not recommended, as modern browsers may create multiple SSL
sessions).
Stuart
On Tue, May 10, 2016 at 12:21 AM, Harris, Carl <ceharris(a)vt.edu> wrote:
In a handler that is part of my servlet extension, I want to be able
to create a session using SessionManager.
Looks like I could get the relevant manager from the HttpExchange using the attachment
key declared in the SessionManager interface. I'm not quite sure what to pass as the
SessionConfig argument to createSession. It looks like there are two implementations of
SessionConfig; one that uses the JSESSIONID cookie, and another that uses the SSL
session.
The SslSessionConfig takes a fallback config, and so it looks like this might be the
right thing to do:
SessionConfig sessionConfig = new SslSessionConfig(new SessionCookieConfig(),
sessionManager);
Just looking for confirmation or correction.
Thanks,
carl
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev