Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 410895

Summary: Disable exit confirmation before redirect
Product: [RT] RAP Reporter: Oliver B. <oliver>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 2.2 M1   
Hardware: PC   
OS: Windows 7   
URL: http://www.eclipse.org/forums/index.php/mv/msg/489019/1063824/#msg_1063824
Whiteboard: sr211

Description Oliver B. CLA 2013-06-17 03:02:43 EDT
If the client receives a redirect request from the server (e.g. as workaround for bug 390711 when a session timeout occurs), the exit confirmation is enabled and the user denies the exit confirmation a javascript errors occurs.

In a situation like this the exit confirmation is unnecessary, because the user cannot continue anyway and it breaks the redirect.

The exit confirmation should be disabled before the redirect.

Steps to reproduce:
1. Open multiple tabs for the same application/session
2. In one tab the user presses logout and the http session is invalidated and the user is sent to logout/login page
3. The other tabs will be informed of the logout with the next request (tomcat redirects to login page because of the invalid session cookie)
4. That XHR request fails and the json redirect to the login page is issued (using the sample jsp login page from bug 390711)
5. Before the json redirect is processed the browser exit confirmation triggers
6. If the user denies the browser exit confirmation the javascript error occurs
Comment 1 Ivan Furnadjiev CLA 2013-06-17 07:00:50 EDT
Fixed in master with commit aa2adc31e034992aad70a9b2c062e48ec637ac94.
Comment 2 Ralf Sternberg CLA 2013-08-08 10:20:55 EDT
I think this fix is safe enough to be included in 2.1.1.
Comment 3 Ivan Furnadjiev CLA 2013-08-09 03:26:58 EDT
Backported to 2.1-maintenance branch with commit 52c80a113fbaecb3d5453cc17c0fecc6ad08bea4.