[undertow-dev] create session in handler

Harris, Carl ceharris at vt.edu
Mon May 9 10:21:48 EDT 2016


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





-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://lists.jboss.org/pipermail/undertow-dev/attachments/20160509/c1f83198/attachment.bin 


More information about the undertow-dev mailing list