gwtjersey-2.0resty-gwt

Session Management in GWT without RPC


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?


Solution

  • The same:

    @Context HttpServletRequest request;
    

    then

    request.getSession()