users@jersey.java.net

Re: [Jersey] Jersey and SSO

From: Martin Matula <Martin.Matula_at_Sun.COM>
Date: Tue, 24 Aug 2010 09:43:42 +0200

Hi,

On Aug 24, 2010, at 12:21 AM, Yu, Xiaohui wrote:

> It is noticed by default no http session is created when accessing
> Jersey app. I can use @Context to enforce it, but that's not ideal
> as I don't want to have @Context on my service interface.
>
Did you know you can declare a private field in your resource
annotated with @Context annotation with the same result as if it would
be a method parameter? That way it does not become part of the
interface.
Martin