Multiple RAP Sessions lead to Session Timeout [message #1783730] |
Fri, 16 March 2018 07:08  |
Eclipse User |
|
|
|
Hi everybody,
i am asking for help, because i ran into trouble with multiple RAP sessions and Jetty handling those sessions in one browser with multiple tabs. Everything works fine if only use one session in one tab, but when i open another tab (same browser) and load the second RAP application the first session gets a Session Timeout ("The server session timed out"). Both RAP applications are running on the same server and are reachable on the same adress with different ports and different servlet paths.
1. RAP Application: 192.168.1.10:8081/test
2. RAP Application: 192.168.1.10:8082/test2
RAP Version: 3.2.0
Jetty Version: 9.4.5
org.eclipse.equinox.http.jetty Version: 3.4.0
http://wiki.eclipse.org/RAP/FAQ#How_to_run_a_RAP_application_in_multiple_browser_tabs.2Fwindows.3F
https://www.eclipse.org/forums/index.php/t/201712/
I already found some information to prevent this "Session Timeout", but those posts and the FAQ entry are relying on RAP 2.1.0.
Is this still the correct way to avoid the "Session Timeout" problem and if yes, are their any limitations for using this?
Thanks for your help!
Regards,
Sebastian
|
|
|
|
|
|
Re: Multiple RAP Sessions lead to Session Timeout [message #1783990 is a reply to message #1783988] |
Wed, 21 March 2018 05:22   |
Eclipse User |
|
|
|
Hi,
i tried the way mentionend in the FAQ entry [1] to configure jetty to not use cookies for session recognition by implementing a jettycustomizer, which is provided by a fragment-plugin and forces jetty to use url recognition. This works fine, but is this really the correct way to achieve what i want?
[1] http://wiki.eclipse.org/RAP/FAQ#How_to_run_a_RAP_application_in_multiple_browser_tabs.2Fwindows.3F
My assumption is that jetty is using the cookie to get/ask for the correct http session (serverside), but there is only one cookie for every host. In my case there are rap-applications running on the same host and everytime i connect to an rap app with the same browser a cookie is placed for the host (app 1 url 192.168.1.10:8081/test -> host:192.168.1.10). If i connect to another session (app 2 url 192.168.1.10:8082/test2 -> host: 192.168.1.10) the host is still the same, but jetty already generated a new sessionid, which is placed as cookie for the same host. So the cookie will be overwritten. After switching to the tab with the first opened rap app jetty will read the sessionid in the cookie and ask the session handler for the correct session, which cant be provided, because the id belongs to the session of the second rap-application and therefore rap signals a session timeout.
Could you give me your thoughts on that and maybe tell me what handler you are using for your rap demo apps?
I forgot to mention that i use RAP in combination with E4 (3.2.0). A snippet/project will be provided as soon as possible.
Regards,
Sebastian
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.30795 seconds