On Mar 17, 2013, at 5:56 PM, Nick Williams wrote: > Based on my reading of the WebSocket spec mailing lists and API > documentation, if I want to get the HttpSession that exists when a WebSocket > connection is negotiated I need to extend ServerEndpointConfig.Configurator, > override #modifyHandshake(), and call #getHttpSession() on the > HandshakeRequest. However, I need a little clarification, because I'm not > seeing how this is going to work: > > 1) Tomcat doesn't implement HandshakeRequest ... anywhere. So I'm not even > seeing how that method could ever be called with a non-null argument. > (Admittedly, I haven't run this yet ... I'm sending this preemptively while I > complete my code, to go ahead and get some feedback). > > 2) None of the arguments to #modifyHandshake() provide access to the Session. > So how am I supposed to do anything with it? How can I associate the > HttpSession with the Session?
I answered my own questions: 1) That's because it didn't, and it wasn't ever calling modifyHandshake(). I created a bug and submitted a patch for this. 2) Apparently userProperties is the way to go. userProperties can be accessed from the EndpointConfig argument to #modifyHandshake() or from Session. I can store the HttpSession in there. Wish there were a less roundabout way of getting there... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org