Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Server session timed out for two RAP instance in same browser
Server session timed out for two RAP instance in same browser [message #644376] Fri, 10 December 2010 17:46 Go to next message
Jean Bovet is currently offline Jean BovetFriend
Messages: 34
Registered: September 2009
Member
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 #644394 is a reply to message #644376] Fri, 10 December 2010 20:49 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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 #644399 is a reply to message #644394] Fri, 10 December 2010 22:01 Go to previous messageGo to next message
Jean Bovet is currently offline Jean BovetFriend
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 Go to previous messageGo to next message
Cole Markham is currently offline Cole MarkhamFriend
Messages: 150
Registered: July 2009
Location: College Station, TX
Senior Member

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 #644424 is a reply to message #644403] Sat, 11 December 2010 04:32 Go to previous messageGo to next message
Jean Bovet is currently offline Jean BovetFriend
Messages: 34
Registered: September 2009
Member
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
Re: Server session timed out for two RAP instance in same browser [message #644446 is a reply to message #644424] Sat, 11 December 2010 13:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sroeck.heiler.com

Hi Jean,

another option could be to assign two different domain names to your two
applications. In this case, cookies should not be shared. I just learned
from [1] that this does not apply for ports.

Regards,
Stefan.

[1]
http://stackoverflow.com/questions/1612177/are-http-cookies- port-specific
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 Go to previous message
Jean Bovet is currently offline Jean BovetFriend
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
Previous Topic:SessionSingletonBase reset each time the page is refreshed
Next Topic:CSS for Toolbar Separator
Goto Forum:
  


Current Time: Sun Oct 17 20:22:29 GMT 2021

Powered by FUDForum. Page generated in 0.01904 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top