| Summary: | Improve Session Timeout Responsiveness and Customizability | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Austin Riddle <austin.riddle> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | niels.lippke, ronald.so | ||||
| Version: | 1.5 | Flags: | a_mergey:
juno-
|
||||
| Target Milestone: | 2.0 M3 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Austin Riddle
Created attachment 213782 [details]
Patch that implements a custom timeout page and interval
Sorry, there are apparently there are a few formatting inconsistencies in the patch. Also, here is an example of usage: ----------- Display display = PlatformUI.createDisplay(); //Used by hack in DisplayLCA to set timeout page. //URL Should be an accessible url (perhaps exposed via http registry) Display.getCurrent().setData( "org.eclipse.rap.rwt.timeoutPage", TIMEOUT_URL ); RWT.getRequest().getSession().setMaxInactiveInterval(1800); //kill session after 30 minutes of inactivity ------------ This code will cause a client session to timeout after 30 minutes. The client will be redirected to the timeout url. Hope some will get some use out of this. (In reply to comment #2) > Sorry, there are apparently there are a few formatting inconsistencies in the patch. Apart from the "formatting inconsistencies" there are no JUnit tests. More over, you preserve the "timeoutPage" and "timeoutInterval" properties in the DisplayLCA, but never render them to the client. Are you sure that the patch is complete? Just a note: There is another enhancement request (bug 292607) for a similar issue. This enhancement request could fix a bug with current session timeout mechanism.
For RAP application with declarative security, after timeout, request sent from the client comes unauthenticated, so the server forward to the login form, and reply it so there is an error page instead of timeout message
Could not process server response:
Error: SyntaxError: Unexpected token <
Script: " <title>Login form</title> ......... [Login form html code] ..... "
Stack: SyntaxError: Unexpected token <
at Object.parse (native)
at [object Object]._handleCompleted (http://localhost:8088/semarchy/rwt-resources/rap-client-df2df2ff.js:49396:34)
Is this patch available in RAP 1.5? I have a need for my UI to automatically redirect to a URL when session expires. Right now, the UI won't present the timeout message until a request being sent from the client. Thanks. As of bug 388280, the client is notified immediately in case of a session timeout. Of course, the requires server push to be active. The redirect option is covered by bug 292607. |