users@jersey.java.net

Re: [Jersey] PerSession REST-Ressources

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 02 Sep 2009 16:13:19 +0200

On Sep 2, 2009, at 3:41 PM, Christopher Schmidt wrote:

> Hello, we want to use PerSession REST-ressources to limit the required
> tomcat ressources.
>
> Do you have an example how to use the Client API to do this?
>

Not specifically, but you should be able to use the Apache HTTP client
integration and enable cookies:

See:

   https://jersey.dev.java.net/nonav/apidocs/1.1.2-ea/contribs/jersey-apache-client/com/sun/jersey/client/apache/package-summary.html

  DefaultApacheHttpClientConfig cc = new
DefaultApacheHttpClientConfig();
   
cc.getProperties().put(ApacheHttpClientConfig.PROPERTY_HANDLE_COOKIES,
true);
  ApacheHttpClient c = ApacheHttpClient.create(cc);

which should set up things to use RCF 2109 as the cookie handling
mechanism.

Paul.