|
|
Re: Server session timed out for two RAP instance in same browser [message #644399 is a reply to message #644394] |
Fri, 10 December 2010 22:01 |
Jean Bovet Messages: 34 Registered: September 2009 |
Member |
|
|
Hi Ivan,
Yes, I've seen these entries but they concern a single application
access in a multi-tabbed browser or multi-browser. I am getting an
issue when accessing two separate instances of the same application
within one browser (each application in its own tab). Each application
is listening on its own port.
Regards,
Jean
On 2010-12-10 12:49:20 -0800, Ivan Furnadjiev said:
> Hi Jean,
> see this bug:
> 285398: Enable tabbed browsing
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=285398
> and this FAQ entry:
> http://wiki.eclipse.org/RAP/FAQ#How_to_run_a_RAP_application _in_multiple_browser_tabs.2Fwindows.3F
HTH,
Ivan
On
>
> 10.12.2010 7:46 PM, Jean Bovet wrote:
>> Hi,
>>
>> I am running two RAP applications (they each run on their own JVM) and
>> I'm trying to access them using two tabs on the same browser. However,
>> when I do that, accessing one application will give the message "The
>> server session timed out". Accessing both application from different
>> browser works fine though. Is that an expected behavior? Is there a way
>> to avoid this problem?
>>
>> Thanks a lot,
>>
>> Jean
|
|
|
Re: Server session timed out for two RAP instance in same browser [message #644403 is a reply to message #644399] |
Fri, 10 December 2010 22:57 |
|
Jean,
Are your two applications on the same server and/or domain? I think this is related to session cookies. Each application is giving you its own session id which is getting put into a cookie (typically something like JSESSIONID). The problem is that browsers are designed to send cookies based on the domain so that something like http://store.com/cart and http://store.com/item will get the same cookies and be able to determine the proper session to use. What happens with RAP is that the cookie from the second server you connect to will overwrite the first. Then when you send a new request to the first (e.g., click a button), it will send the cookie from the second server. The first server will not have a record of that session and will send you the error.
The solution to this problem should be the same as the solution for multiple tabs on a single application: pass the session id on the URL instead of as a cookie. The FAQ entry Ivan referenced should explain how to set this up.
Cole
|
|
|
|
|
Re: Server session timed out for two RAP instance in same browser [message #644525 is a reply to message #644424] |
Mon, 13 December 2010 01:06 |
Jean Bovet Messages: 34 Registered: September 2009 |
Member |
|
|
Works great, thanks for your help! I must say that I really love RAP :-)
Jean
On 2010-12-10 20:32:21 -0800, Jean Bovet said:
> Hi,
>
> Thanks for the explanation, that is clear now. Thanks Ivan too. I will
> try that this week-end and will let you know how that works.
>
> Regards,
>
> Jean
>
> On 2010-12-10 14:57:15 -0800, Cole Markham said:
>
>> Jean,
>>
>> Are your two applications on the same server and/or domain? I think
>> this is related to session cookies. Each application is giving you its
>> own session id which is getting put into a cookie (typically something
>> like JSESSIONID). The problem is that browsers are designed to send
>> cookies based on the domain so that something like
>> http://store.com/cart and http://store.com/item will get the same
>> cookies and be able to determine the proper session to use. What
>> happens with RAP is that the cookie from the second server you connect
>> to will overwrite the first. Then when you send a new request to the
>> first (e.g., click a button), it will send the cookie from the second
>> server. The first server will not have a record of that session and
>> will send you the error.
>>
>> The solution to this problem should be the same as the solution for
>> multiple tabs on a single application: pass the session id on the URL
>> instead of as a cookie. The FAQ entry Ivan referenced should explain
>> how to set this up.
>>
>> Cole
|
|
|
Powered by
FUDForum. Page generated in 0.03834 seconds