Disable session id based on cookies in RAP to use multiple browsers and tabbed browsing

571 views Asked by At

I tried to prevent cookies for identifying the session in RAP. There are a lot of sources. The most important are obviously this and that one. It seems the jettycustomizer disappeared. Which JVM parameter would I have now to supply to force Jetty out of Eclipse not to use cookies.

The given option -Dorg.eclipse.equinox.http.jetty.customizer.class=org.eclipse.rap.jettycustomizer.internal.SessionCookieCustomizer doesn't work for me.

1

There are 1 answers

0
ralfstx On BEST ANSWER

AFAIK, you can't disable session cookies in Jetty by means of declaration, you need to do it programmatically. According to this post, the following code does the trick:

((HashSessionManager)context.getSessionHandler().getSessionManager())
  .setUsingCookies(false);

The RAP project used to provide a fragment bundle for jetty that contains a customizer class which disables sessions using this method. This customizer has to be enabled with the system property you referred to, but this only works when the fragment is present in your environment.

This “jettycustomizer” bundle has been dropped when RAP enabled support for multi-tab browsing, but you can still get it from the 2.1 branch.