Cleanly logout of a RAP application [message #529891] |
Tue, 27 April 2010 15:17 |
|
We need to have a button in our RAP application that allows the user to logout cleanly. It should kill the session on the server and present the user with a static html page.
We have tried a couple of different methods to make this work, but we end up getting error popups on the client browser ("Server is unavailable, retry?").
The latest method I tried was using a phase listener like the example on the FAQ for changing locales. It seemed to work but the session didn't die, if you went back to the page it would reconnect to the same session. Then I realized that the error popup is still there, it just disappears before you can see it.
Is there a best practice for cleanly shuting down a RAP application and redirecting to a static page?
Thanks,
Cole
|
|
|
Re: Cleanly logout of a RAP application [message #530037 is a reply to message #529891] |
Wed, 28 April 2010 09:17 |
|
Cole Markham wrote on Tue, 27 April 2010 17:17 | We need to have a button in our RAP application that allows the user to logout cleanly. It should kill the session on the server and present the user with a static html page.
We have tried a couple of different methods to make this work, but we end up getting error popups on the client browser ("Server is unavailable, retry?").
The latest method I tried was using a phase listener like the example on the FAQ for changing locales. It seemed to work but the session didn't die, if you went back to the page it would reconnect to the same session. Then I realized that the error popup is still there, it just disappears before you can see it.
Is there a best practice for cleanly shuting down a RAP application and redirecting to a static page?
Thanks,
Cole
|
Shutting down a rap application should probably done trough the the Activator,. Were you start the other bundles that are needed and just stop them each of them before disposing your self and redirecting to a static html page.
I wouldn't know any other way to cleanly shut-down a OSIi/RAP application then trough that root.
You could look at this treat about shutting down Equinox ( http://dev.eclipse.org/newslists/news.eclipse.technology.equ inox/msg03905.html)
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
|
Re: Cleanly logout of a RAP application [message #530118 is a reply to message #529891] |
Wed, 28 April 2010 14:06 |
Rüdiger Herrmann Messages: 581 Registered: July 2009 |
Senior Member |
|
|
Hi Cole,
let me divide your question into two:
* correct me if I'm wrong but displaying a "logout-page" seems to be
solved by following the approach from the FAQ for changing locales.
* to let the session die, why can't you wait for the servlet engine to
clean up the session when its timout is reached?
Regards,
Rüdiger
--
Rüdiger Herrmann
http://eclipsesource.com
On 27.04.2010 17:17, Cole Markham wrote:
> We need to have a button in our RAP application that allows the user to
> logout cleanly. It should kill the session on the server and present the
> user with a static html page.
>
> We have tried a couple of different methods to make this work, but we
> end up getting error popups on the client browser ("Server is
> unavailable, retry?").
> The latest method I tried was using a phase listener like the example on
> the FAQ for changing locales. It seemed to work but the session didn't
> die, if you went back to the page it would reconnect to the same
> session. Then I realized that the error popup is still there, it just
> disappears before you can see it.
>
> Is there a best practice for cleanly shuting down a RAP application and
> redirecting to a static page?
>
> Thanks,
> Cole
|
|
|
Powered by
FUDForum. Page generated in 0.03791 seconds