Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP 2.3: Close a RAP application session and redirect to another page
RAP 2.3: Close a RAP application session and redirect to another page [message #1802504] Mon, 11 February 2019 08:39 Go to next message
Moritz Thomas is currently offline Moritz ThomasFriend
Messages: 4
Registered: April 2014
Junior Member
Hi,

what is the recommended way to close a workbench-based RAP application (session) in response to a user action?

We are in the process of switching from login within the application to handling it outside (redirect to html form and back to application after successful authentication.)

The Logout handler within the application should now close the application and redirect back to the login page. What we have tried:

1) redirect from handler and invalidate the http session. Redirect does not work reliably (maybe debugging interferes) and I'm not sure the application cleans up resources

      
RWT.getClient().getService(JavaScriptExecutor.class).execute("parent.window.location.href=\"" + url + "\";");
RWT.getUISession().getHttpSession().setMaxInactiveInterval(1);


2) Close the workbench and redirect immediately. Redirect does't seem to work in that case

3) Close the workbench and redirect in IWorkbenchLIstener.postShutdown. Redirect does't seem to work in that case

Closing the workbench would feel much cleaner than the first approach - so basically the question boils down to: what is the best way to send a redirect in the processing of closing the application/workbench.

Any advice?

Thanks in advance
Moritz
Re: RAP 2.3: Close a RAP application session and redirect to another page [message #1802516 is a reply to message #1802504] Mon, 11 February 2019 09:51 Go to previous message
Moritz Thomas is currently offline Moritz ThomasFriend
Messages: 4
Registered: April 2014
Junior Member
Ok, so I have got #3 working by writing directly to the protocol writer as recommended in some other thread. That's good!

What's left bugging me is that the UIThread remains running. They will probably be cleaned up, when the http session is timing out? Or should we call something other than (or in addition to) workbench.close()?

Thanks
Moritz
Previous Topic:Copy to clipboard
Next Topic:Tab sequence does not work properly for custom composite widgets extending Composite
Goto Forum:
  


Current Time: Sat Dec 14 16:11:26 GMT 2019

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

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

Back to the top