문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top