Version 2



    The @CookieParam annotation allows you to inject the value of a cookie or an object representation of an HTTP request cookie into your method invocation


    GET /books?num=5


       public String getBooks(@CookieParam("sessionid") int id) {
       publi cString getBooks(@CookieParam("sessionid") id) {...}


    Like PathParam, your parameter type can be an String, primitive, or class that has a String constructor or static valueOf() method.  You can also get an object representation of the cookie via the class.