0

In a new GWT project (running in Tomcat), instead of using RPC, I'm using RestyGWT and Jersey on the server side for my communication. With RPC, sessions could be created and managed with getThreadLocalRequest().getSession(). As far as I know, the backing HttpServletRequest is managed by GWT/Tomcat.

How can I accomplish the same thing using Jersey?

Troncoso
  • 2,343
  • 3
  • 33
  • 52

1 Answers1

2

The same:

@Context HttpServletRequest request;

then

request.getSession()
Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
  • Yeah, I found this after searching for something different. I didn't realize you could just inject the context like that. Thanks! – Troncoso Jul 25 '16 at 11:55