users@jersey.java.net

[Jersey] Re: Having sessions and cookies in Jersey Test Framework

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Mon, 10 Sep 2012 16:37:27 +0200

Hello Christof,

you'll need to implement session support by yourself, there is not
in-built support for it. (it shouldn't be that hard, basically you want
to create ContainerRequestFilter which would manage your sessions).

Regards,
Pavel

On 8/30/12 6:19 PM, Christof Doll wrote:
>
> Hi,
>
> in my current project I use a JaxRS interface between a JavaScript
> client and a Java server. Users authenticate via a form post.
> Afterwards the session id is stored in a cookie. I know that this is
> not restful. However, I don't want authentication upon each single
> request.
>
> Is there any way to test my application using the Jersey Test
> Framework? I haven't found any possibility to have control over
> sessions and cookies.
>
> Best regards,
>
> Christof
>