Re: Tomcat 8 Websocket API - Cookies Headers

2013-08-23 Thread toddfas
Thanks very much for the quick response Niki! I went down the configurator path too, but then I could not find a way to pass the cookie values into the ServerEndPoint.onOpen where I need to use it. I tried passing it via session.getRequestParameterMap() but that is a

Re: Tomcat 8 Websocket API - Cookies Headers

2013-08-23 Thread Niki Dokovski
On Fri, Aug 23, 2013 at 7:03 PM, toddfas todd...@gmail.com wrote: Thanks very much for the quick response Niki! I went down the configurator path too, but then I could not find a way to pass the cookie values into the ServerEndPoint.onOpen where I need to use it. I tried passing it via

Re: Tomcat 8 Websocket API - Cookies Headers

2013-08-23 Thread toddfas
Our existing web app has custom session management (does not use JSESSIONID) and stores the session identifier in a cookie. The cookie is marked httpOnly (and secure) so the client side Javascript opening the websocket does not have access to it. I want to use this session identifier in

Re: Tomcat 8 Websocket API - Cookies Headers

2013-08-23 Thread Nick Williams
In the modifyHandshake method of your Configurator, you can call getUserProperties on the EndpointConfig argument. This returns a modifiable MapString, Object that you can add values to. After modifyHandshake returns and before onOpen is called, the values from that map are copied to the

Re: Tomcat 8 Websocket API - Cookies Headers

2013-08-23 Thread Nick Williams
On Aug 23, 2013, at 1:25 PM, Nick Williams wrote: In the modifyHandshake method of your Configurator, you can call getUserProperties on the EndpointConfig argument. This returns a modifiable MapString, Object that you can add values to. After modifyHandshake returns and before onOpen is

Re: Tomcat 8 Websocket API - Cookies Headers

2013-08-23 Thread toddfas
On Fri, Aug 23, 2013 at 11:25 AM, Nick Williams nicho...@nicholaswilliams.net wrote: In the modifyHandshake method of your Configurator, you can call getUserProperties on the EndpointConfig argument. This returns a modifiable MapString, Object that you can add values to. After modifyHandshake

Tomcat 8 Websocket API - Cookies Headers

2013-08-22 Thread toddfas
I'm trying to figure out how to get access to the cookies and headers passed up in the Websocket handshake request on Tomcat 8. In Tomcat 7 the whole HttpServletRequest was passed into the WebSocketServlet. createWebSocketInbound method so it was easy to grab from the request headers. In Tomcat 8

Re: Tomcat 8 Websocket API - Cookies Headers

2013-08-22 Thread Niki Dokovski
On Fri, Aug 23, 2013 at 2:58 AM, toddfas todd...@gmail.com wrote: I'm trying to figure out how to get access to the cookies and headers passed up in the Websocket handshake request on Tomcat 8. In Tomcat 7 the whole HttpServletRequest was passed into the WebSocketServlet.