users@jsr311.java.net

Re: JSR311: _at_Cookie

From: Dhanji R. Prasanna <dhanji_at_gmail.com>
Date: Tue, 12 Feb 2008 09:24:25 +1000

On Feb 12, 2008 8:31 AM, Bill Burke <bburke_at_redhat.com> wrote:

> I think some form of @Cookie injection would be useful:
>
> @GET
> public String get(@Cookie("myCookie") int value)
> {
> }
>
> Would save a lot of typing. The only problem I see with this is that it
> overloads with javax.ws.rs.core.Cookie. Maybe rename the object to
> CookieInstance?
>
> I'm thinking you could also do:
>
> @GET
> public String get(@Cookie("myCookie") CookieInstance instance){}


Hmm. Not a bad idea. Why not:

public Response get(@Param("cookieName") javax.servlet...Cookie cookie);

?

Dhanji.