Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » HttpSession Listener
HttpSession Listener [message #997623] Fri, 04 January 2013 18:24 Go to next message
Siarhei Navatski is currently offline Siarhei Navatski
Messages: 14
Registered: July 2009
Junior Member
Hi All
How to add HttpSessionListener in RAP application? I want subscribe to
the session expiration. SessionStore has similar functionality but
session store expires after refresh page (F5). I want to add
HttpSessionListener exactly

Thanks
Re: HttpSession Listener [message #997629 is a reply to message #997623] Mon, 07 January 2013 11:07 Go to previous message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1290
Registered: July 2009
Senior Member

According to the JavaDoc, you can add an HttpSessionListener using
ServletContext.addListener( ... ). This requires servlet 3.0 API.

You get a reference to the ServletContext using

RWT.getSessionStore().getHttpSession().getServletContext()

In RAP 2.0, it's

RWT.getUISession().getHttpSession().getServletContext()

Regards,
Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:RAP focus after shell setVisible
Next Topic:Clientscripting does not work with RAP 2.0 M4
Goto Forum:
  


Current Time: Thu Oct 02 10:42:40 GMT 2014

Powered by FUDForum. Page generated in 0.02486 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software