How to use HttpSessionListener?
How to make development environment?
0. My environment
- Eclipse RAP (rap-3.1.0-N-20150914-1435)
- Java 1.8
1. create class
public class HttpSessionCollectorListener implements HttpSessionListener {
.....
}
2. setting class
RWT.getUISession().getHttpSession().getServletContext().addListener(new HttpSessionCollectorListener());
but rise the error.
2016 Jun 29 21:54:21, 110 ERROR - LoginDialog : okPressed login exception
java.lang.UnsupportedOperationException
at org.eclipse.equinox.http.servlet.internal.servlet.ServletContextAdaptor.addListener(ServletContextAdaptor.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.http.servlet.internal.servlet.ServletContextAdaptor.invoke(ServletContextAdaptor.java:343)
at org.eclipse.equinox.http.servlet.internal.servlet.ServletContextAdaptor$5.invoke(ServletContextAdaptor.java:360)
at com.sun.proxy.$Proxy0.addListener(Unknown Source)