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

Bug 396065

Summary: Theme broken when navigating between entrypoints
Product: [RT] RAP Reporter: Ralf Sternberg <rsternberg>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1    
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ralf Sternberg CLA 2012-12-07 12:14:52 EST
To reproduce, start the workbench demo and
1) go to http://localhost:PORT/business

  -> Notice that the client loads the theme file: http://localhost:9092/rwt-resources/rap-rwt.theme.Custom_c072efd1.json

2) change the URL to http://localhost:PORT/fancy and press Enter

  -> the browser does not load a theme file and displays a broken theme.

3) reload (F5)

  -> the theme file is loaded and the theme is ok again
Comment 1 Ivan Furnadjiev CLA 2012-12-10 06:10:09 EST
I think that this is very important issue. First of all, if I enable the "org.eclipse.rap.jettycustomizer" to disable the session cookie to problem is solved. The problem is following - the second GET request runs into the old session store. As a result, the current theme for the other entry point is used. Current theme is set in SessionStoreBuilder#buildSessionStore. A dirty hack to reinitialize the session store in the GET request fixes the problem too. I think it is related to bug 386504 and bug 390381. Till bug 390381 is fixed, we could reinitialize the session store not in the POST request when we detect session restart, but in every GET request.
Comment 2 Ivan Furnadjiev CLA 2012-12-10 10:35:12 EST
Another possibility is find current theme (StartupJson#appendLoadThemeDefinitions) by current request servletPath like it is done the SessionStoreBuilder#setCurrentTheme and not to query session store.
Comment 3 Ralf Sternberg CLA 2012-12-10 11:31:03 EST
I'd prefer the approach suggested in comment 2. The policy is that GET requests don't change the server's state. They should not need to create and not even to access a UI session. Only POST request should deal with the UI session.
Comment 4 Ivan Furnadjiev CLA 2012-12-11 03:49:59 EST
Fixed in master like suggested in comment#2 with commit 40408fd27fb9cceacdd3459fb188ed653dea8b2f.