Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Session cleared at browser reload.
Session cleared at browser reload. [message #521729] Thu, 18 March 2010 11:36 Go to next message
Eclipse UserFriend
Hi,
in this newsgroup i found this sentence in an old message:

"...RAP has a means to clear an existing session, that's what we call a session restart. This happens for example when the user clicks he browsers' refresh button. In LifeCycleServiceHandler#isSessionRestart() the decision whether a session should be restarted is made...."


I'm trying to embedding RAP inside our already implemented application using iframes. Each time the iframe is refreshed (for example because the browser refresh button is clicked) the RAP framework removes all our session objects, because the url ".../rap?startup=myapp" is invoked again.

Is there a way to avoid "session restart"?

Thanks.
Re: Session cleared at browser reload. [message #521944 is a reply to message #521729] Fri, 19 March 2010 08:15 Go to previous messageGo to next message
Eclipse UserFriend
A suggestion I read in another post was, to put the data you want to survive a browser refresh in a static map, with the session id as key, instead of storing the data in the session.
The session gets cleared on browser refreshs, but the session id stays the same.

This works well for me.
Re: Session cleared at browser reload. [message #521961 is a reply to message #521944] Fri, 19 March 2010 09:27 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your response.

I solved the problem in a different way: i registered a filter for "/" mapping (i.e. generic rap invocation), in this filter I wrapped the request and i reimplemented the getSession methods. These methods returns a wrapped HttpSession object in which I reimplemented the removeAttribute method. In this implementation I check for attribute name, and if it is not "mine" I remove it otherwise I keep it.

I cannot use your solution because a static map is not replicated between clusters that is a must for an enterprise application.

regards

gianluca
Re: Session cleared at browser reload. [message #522120 is a reply to message #521961] Sat, 20 March 2010 05:45 Go to previous message
Eclipse UserFriend
In case you want to cc yourself, I just filed this enhancement request:
Bug 306599 - Improve session restart
https://bugs.eclipse.org/bugs/show_bug.cgi?id=306599

Regards
Rüdiger
Previous Topic:SWT.CENTER doesn't work with SWT.PASSWORD
Next Topic:mouseUp event on sash only onright side
Goto Forum:
  


Current Time: Sat Aug 30 17:47:09 EDT 2025

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

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

Back to the top