You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zsolt Koppany <zk...@intland.com> on 2008/06/19 12:24:27 UTC
JSESSIONID doesn't contain the port
Hi,
we have two web applications running on the same host (with the same tomcat)
but on DIFFERENT ports.
Buf, if one tomcat application refers on URL of the second application the
browser (FF-2.0.0.14 IE-6) get a NEW a new JSESSIONID thus the browser
looses its session-id to the first application.
How can we make tomcat-5.5.25 to store also port into JSESSIONID?
Zsolt
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Leon Rosenberg <ro...@googlemail.com>.
ok, it that case all you need are just two virtual hosts.
Leon
On Fri, Jun 20, 2008 at 8:56 AM, Zsolt Koppany <zk...@intland.com> wrote:
> Thank you everybody making comments to my original post.
>
> Our customer has two tomcats because one instance is the production version
> of our application and the second one is a test instance of the new version
> of the same application. Because of that the context-pathes are the same.
>
> I understand, that context-path can be changed but means more hacking for
> the customer. The other problem is that the customer stored in our wiki
> pages URL-s with context path (but without port). It could be discussed
> whether or not this is lucky but this is the case.
>
> Zsolt
>
>> -----Original Message-----
>> From: Christopher Schultz [mailto:chris@christopherschultz.net]
>> Sent: Thursday, June 19, 2008 10:08 PM
>> To: Tomcat Users List
>> Subject: Re: JSESSIONID doesn't contain the port
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Zsolt,
>>
>> Zsolt Koppany wrote:
>> | How can we make tomcat-5.5.25 to store also port into JSESSIONID?
>>
>> You can't really do that, unless you want to hack-up TC's source.
>>
>> What you could do is deploy your applications under different context
>> names, instead of deploying them both as ROOT. In that case, the
>> JSESSIONID cookie will have a unique path associated with it, and they
>> won't clobber each other.
>>
>> Another option would be to turn off cookies on the server, and use only
>> URL-encoded session ids.
>>
>> - -chris
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>>
>> iEYEARECAAYFAkhavLsACgkQ9CaO5/Lv0PBvBgCcDpc3S6mQSZUlH39692/cRM5C
>> yXkAoKlTmd0vkg1kRpMF0ivzEvE8KzR7
>> =Ymjf
>> -----END PGP SIGNATURE-----
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Leon,
Leon Rosenberg wrote:
| http://host:8000/theApp vs http://host:8080/theApp or whatever ports
| he uses? :-)
Oh, right. Duh!
Yeah... I think he's kinda screwed.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhbxa4ACgkQ9CaO5/Lv0PCSDACfWIDaM7zj2z9co0ZBCz8ml7FC
jwEAnRP0/CNIIBPbPJ/qGoF7ridudsuj
=tskU
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Leon Rosenberg <ro...@googlemail.com>.
On Fri, Jun 20, 2008 at 4:16 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Zsolt,
>
> Zsolt Koppany wrote:
> | Our customer has two tomcats because one instance is the production
> version
> | of our application and the second one is a test instance of the new
> version
> | of the same application. Because of that the context-pathes are the same.
>
> How do you know where the first request (say, to http://host/theApp)
> should go -- production or test? This seems like a weird configuration.
> Can you explain it a little more?
>
http://host:8000/theApp vs http://host:8080/theApp or whatever ports
he uses? :-)
Leon
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Zsolt,
Zsolt Koppany wrote:
| Our customer has two tomcats because one instance is the production
version
| of our application and the second one is a test instance of the new
version
| of the same application. Because of that the context-pathes are the same.
How do you know where the first request (say, to http://host/theApp)
should go -- production or test? This seems like a weird configuration.
Can you explain it a little more?
| I understand, that context-path can be changed but means more hacking for
| the customer. The other problem is that the customer stored in our wiki
| pages URL-s with context path (but without port). It could be discussed
| whether or not this is lucky but this is the case.
If you were to use something like Apache httpd out front, you might be
able to use a cookie or URL parameter to track which version of the
application the user is using (prod vs. test) and then use mod_rewrite
or a similar module to modify the port connecting to Tomcat.
Just a thought.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhbu9UACgkQ9CaO5/Lv0PC/0wCfSQKU2x3F0iMSU3w1n9P8ye3U
d2UAnA03vZ9W7SGU6BNKj92yhN05R3nH
=Z75a
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JSESSIONID doesn't contain the port
Posted by Zsolt Koppany <zk...@intland.com>.
Thank you everybody making comments to my original post.
Our customer has two tomcats because one instance is the production version
of our application and the second one is a test instance of the new version
of the same application. Because of that the context-pathes are the same.
I understand, that context-path can be changed but means more hacking for
the customer. The other problem is that the customer stored in our wiki
pages URL-s with context path (but without port). It could be discussed
whether or not this is lucky but this is the case.
Zsolt
> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Sent: Thursday, June 19, 2008 10:08 PM
> To: Tomcat Users List
> Subject: Re: JSESSIONID doesn't contain the port
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Zsolt,
>
> Zsolt Koppany wrote:
> | How can we make tomcat-5.5.25 to store also port into JSESSIONID?
>
> You can't really do that, unless you want to hack-up TC's source.
>
> What you could do is deploy your applications under different context
> names, instead of deploying them both as ROOT. In that case, the
> JSESSIONID cookie will have a unique path associated with it, and they
> won't clobber each other.
>
> Another option would be to turn off cookies on the server, and use only
> URL-encoded session ids.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkhavLsACgkQ9CaO5/Lv0PBvBgCcDpc3S6mQSZUlH39692/cRM5C
> yXkAoKlTmd0vkg1kRpMF0ivzEvE8KzR7
> =Ymjf
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Zsolt,
Zsolt Koppany wrote:
| How can we make tomcat-5.5.25 to store also port into JSESSIONID?
You can't really do that, unless you want to hack-up TC's source.
What you could do is deploy your applications under different context
names, instead of deploying them both as ROOT. In that case, the
JSESSIONID cookie will have a unique path associated with it, and they
won't clobber each other.
Another option would be to turn off cookies on the server, and use only
URL-encoded session ids.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhavLsACgkQ9CaO5/Lv0PBvBgCcDpc3S6mQSZUlH39692/cRM5C
yXkAoKlTmd0vkg1kRpMF0ivzEvE8KzR7
=Ymjf
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JSESSIONID doesn't contain the port
Posted by Zsolt Koppany <zk...@intland.com>.
No,
they (must) use the same IP address.
Zsolt
> -----Original Message-----
> From: Pid [mailto:p@pidster.com]
> Sent: Thursday, June 19, 2008 2:45 PM
> To: Tomcat Users List
> Subject: Re: JSESSIONID doesn't contain the port
>
> Zsolt Koppany wrote:
> > Hi,
> >
> > we have two web applications running on the same host (with the same
> tomcat)
> > but on DIFFERENT ports.
> >
> > Buf, if one tomcat application refers on URL of the second application
> the
> > browser (FF-2.0.0.14 IE-6) get a NEW a new JSESSIONID thus the browser
> > looses its session-id to the first application.
> >
> > How can we make tomcat-5.5.25 to store also port into JSESSIONID?
>
> are the apps on different IPs too?
> if not, what's the reason behind running two Tomcat instances?
>
> are you clustering them?
>
> p
>
>
>
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Pid <p...@pidster.com>.
Zsolt Koppany wrote:
> Hi,
>
> we have two web applications running on the same host (with the same tomcat)
> but on DIFFERENT ports.
>
> Buf, if one tomcat application refers on URL of the second application the
> browser (FF-2.0.0.14 IE-6) get a NEW a new JSESSIONID thus the browser
> looses its session-id to the first application.
>
> How can we make tomcat-5.5.25 to store also port into JSESSIONID?
are the apps on different IPs too?
if not, what's the reason behind running two Tomcat instances?
are you clustering them?
p
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by André Warnier <aw...@ice-sa.com>.
Pid wrote:
> André Warnier wrote:
>>
>>
>> Leon Rosenberg wrote:
>>> On Thu, Jun 19, 2008 at 4:51 PM, André Warnier <aw...@ice-sa.com> wrote:
>>>
>>>> Now, maybe the issue is whether the session of one application can
>>>> or cannot
>>>> be valid for the other. If they just shared a session (and a
>>>> cookie), then
>>>> there would be harmony again.
>>>
>>> Or the OP just renames one of his application and all is settled
>>> again :-)
>>>
>> But that would not change the name of the cookie, or would it ?
>
> The problem is that the TC1 sets a value of JSESSIONID that does not
> exist in TC2. So when it visits the 2nd app, the session id it presents
> is not valid.
>
> Changing the cookie name, value or adding a port number will make no
> difference.
>
> AFAIK the only way to resolve this is to set up synchronous clustering
> on the two instances, so that they start sharing session data.
>
I am newbie-level and beg for forgiveness, but why is one talking of
"instances" of Tomcat and clustering if, as I understand the original
post, this is one Tomcat with two Connector ports ?
Does each <Connector> generate one instance of Tomcat ?
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Pid <p...@pidster.com>.
Caldarale, Charles R wrote:
>> From: Pid [mailto:p@pidster.com]
>> Subject: Re: JSESSIONID doesn't contain the port
>>
>> The problem is that the TC1 sets a value of JSESSIONID that does not
>> exist in TC2.
>
> Go back and reread the original post. There's only one instance of Tomcat, but there are two <Connector> elements, each with a unique port. The OP has not said why he thinks it's necessary to have two ports, but it really doesn't matter, since it's irrelevant as far as cookies are concerned.
I have now. Doh.
p
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JSESSIONID doesn't contain the port
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Pid [mailto:p@pidster.com]
> Subject: Re: JSESSIONID doesn't contain the port
>
> The problem is that the TC1 sets a value of JSESSIONID that does not
> exist in TC2.
Go back and reread the original post. There's only one instance of Tomcat, but there are two <Connector> elements, each with a unique port. The OP has not said why he thinks it's necessary to have two ports, but it really doesn't matter, since it's irrelevant as far as cookies are concerned.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Leon Rosenberg <ro...@googlemail.com>.
On Thu, Jun 19, 2008 at 6:09 PM, André Warnier <aw...@ice-sa.com> wrote:
>
>
> So now that it is settled that different names for the cookies /would/ solve
> the problem, is that a possibility in Tomcat ?
> Is it possible for one application to "influence" the name of it's session
> cookie, so that we could have JSESSIONID-1 and JSESSIONID-2 ?
Errm, no :-)
As far as I know there is no chance to change the cookie name since
its part of the spec and hardcoded. But, you can change the path of
the cookie to be the same as the webapp name, in fact it already is.
So if you have the webapp1 and webapp2 than both can have a JSESSIONID
cookie with according path (webapp1 and webapp2).
If the browser access webapp1 it sends only the JSESSIONID cookie with
webapp1 in path and when it accesses webapp2
it sends the webapp2 cookie.
Herewith each of your webapps has its own session and its own session
cookie. Right now i have 7 JSESSIONID cookies in my FFox, with 2 of
them issued by localhost, one by app sshop and one by app bouncer.
Both apps act independently and have own sessions, even in same
tomcat.
The problem that OP has can only occure if both he's webapps have the
same name (or no name -> ROOT), hence overwriting each other. In that
case rename or force one of them to use rewriting.
regards
Leon
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by André Warnier <aw...@ice-sa.com>.
Leon Rosenberg wrote:
> On Thu, Jun 19, 2008 at 5:42 PM, Pid <p...@pidster.com> wrote:
>> André Warnier wrote:
>>>
>>> Leon Rosenberg wrote:
>>>> On Thu, Jun 19, 2008 at 4:51 PM, André Warnier <aw...@ice-sa.com> wrote:
>>>>
>>>>> Now, maybe the issue is whether the session of one application can or
>>>>> cannot
>>>>> be valid for the other. If they just shared a session (and a cookie),
>>>>> then
>>>>> there would be harmony again.
>>>> Or the OP just renames one of his application and all is settled again
>>>> :-)
>>>>
>>> But that would not change the name of the cookie, or would it ?
>> The problem is that the TC1 sets a value of JSESSIONID that does not exist
>> in TC2. So when it visits the 2nd app, the session id it presents is not
>> valid.
>
> yes
>
>> Changing the cookie name, value or adding a port number will make no
>> difference.
>
> of course it would since there will be two different cookies with
> different pathes referring to both different sessions.
> wouldn't there?
>
So now that it is settled that different names for the cookies /would/
solve the problem, is that a possibility in Tomcat ?
Is it possible for one application to "influence" the name of it's
session cookie, so that we could have JSESSIONID-1 and JSESSIONID-2 ?
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JSESSIONID doesn't contain the port
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Leon Rosenberg [mailto:rosenberg.leon@googlemail.com]
> Subject: Re: JSESSIONID doesn't contain the port
>
> of course it would since there will be two different cookies with
> different pathes referring to both different sessions.
The webapps could choose to generate their own cookies with the common portion of the domain (assuming there is one); some experimentation would be needed to insure that the browser sends both back, in which order it does so, and in which order Tomcat processes them.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Leon Rosenberg <ro...@googlemail.com>.
On Thu, Jun 19, 2008 at 5:42 PM, Pid <p...@pidster.com> wrote:
> André Warnier wrote:
>>
>>
>> Leon Rosenberg wrote:
>>>
>>> On Thu, Jun 19, 2008 at 4:51 PM, André Warnier <aw...@ice-sa.com> wrote:
>>>
>>>> Now, maybe the issue is whether the session of one application can or
>>>> cannot
>>>> be valid for the other. If they just shared a session (and a cookie),
>>>> then
>>>> there would be harmony again.
>>>
>>> Or the OP just renames one of his application and all is settled again
>>> :-)
>>>
>> But that would not change the name of the cookie, or would it ?
>
> The problem is that the TC1 sets a value of JSESSIONID that does not exist
> in TC2. So when it visits the 2nd app, the session id it presents is not
> valid.
yes
>
> Changing the cookie name, value or adding a port number will make no
> difference.
of course it would since there will be two different cookies with
different pathes referring to both different sessions.
wouldn't there?
Leon
>
> AFAIK the only way to resolve this is to set up synchronous clustering on
> the two instances, so that they start sharing session data.
>
>
> p
>
>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Pid <p...@pidster.com>.
André Warnier wrote:
>
>
> Leon Rosenberg wrote:
>> On Thu, Jun 19, 2008 at 4:51 PM, André Warnier <aw...@ice-sa.com> wrote:
>>
>>> Now, maybe the issue is whether the session of one application can or
>>> cannot
>>> be valid for the other. If they just shared a session (and a
>>> cookie), then
>>> there would be harmony again.
>>
>> Or the OP just renames one of his application and all is settled again
>> :-)
>>
> But that would not change the name of the cookie, or would it ?
The problem is that the TC1 sets a value of JSESSIONID that does not
exist in TC2. So when it visits the 2nd app, the session id it presents
is not valid.
Changing the cookie name, value or adding a port number will make no
difference.
AFAIK the only way to resolve this is to set up synchronous clustering
on the two instances, so that they start sharing session data.
p
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Leon Rosenberg <ro...@googlemail.com>.
but the path of the cookie. IMHO the path of the cookie is the webapp
context -> /webappname
Leon.
On Thu, Jun 19, 2008 at 5:12 PM, André Warnier <aw...@ice-sa.com> wrote:
>
>
> Leon Rosenberg wrote:
>>
>> On Thu, Jun 19, 2008 at 4:51 PM, André Warnier <aw...@ice-sa.com> wrote:
>>
>>> Now, maybe the issue is whether the session of one application can or
>>> cannot
>>> be valid for the other. If they just shared a session (and a cookie),
>>> then
>>> there would be harmony again.
>>
>> Or the OP just renames one of his application and all is settled again :-)
>>
> But that would not change the name of the cookie, or would it ?
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by André Warnier <aw...@ice-sa.com>.
Leon Rosenberg wrote:
> On Thu, Jun 19, 2008 at 4:51 PM, André Warnier <aw...@ice-sa.com> wrote:
>
>> Now, maybe the issue is whether the session of one application can or cannot
>> be valid for the other. If they just shared a session (and a cookie), then
>> there would be harmony again.
>
> Or the OP just renames one of his application and all is settled again :-)
>
But that would not change the name of the cookie, or would it ?
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by Leon Rosenberg <ro...@googlemail.com>.
On Thu, Jun 19, 2008 at 4:51 PM, André Warnier <aw...@ice-sa.com> wrote:
> Now, maybe the issue is whether the session of one application can or cannot
> be valid for the other. If they just shared a session (and a cookie), then
> there would be harmony again.
Or the OP just renames one of his application and all is settled again :-)
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: JSESSIONID doesn't contain the port
Posted by André Warnier <aw...@ice-sa.com>.
Caldarale, Charles R wrote:
>> From: Zsolt Koppany [mailto:zkoppanylist@intland.com]
>> Subject: JSESSIONID doesn't contain the port
>>
>> we have two web applications running on the same host (with
>> the same tomcat) but on DIFFERENT ports.
>
> For curiosity's sake, why are you doing that?
>
>> Buf, if one tomcat application refers on URL of the second
>> application the browser (FF-2.0.0.14 IE-6) get a NEW a new
>> JSESSIONID thus the browser looses its session-id to the
>> first application.
>
I don't think that cookies are ever port-specific.
But I believe what Zsolt is trying to say, is that the cookies /name/
being the same, when one application for whatever reason decides that
this is a new session, it overwrites the JSESSIONID cookie of the other,
because its session cookie is also named JSESSIONID and comes from the
same host (which usually does make cookies specific, but not in this
case, since it is the same host). Since this (new) cookie comes from
the same host and is called the same, the browser happily overwrites the
old one. So when the user goes back later to his old session on the
other port, the browser sends the last-gotten cookie, but that's not the
one Tomcat is expecting there.
Now, maybe the issue is whether the session of one application can or
cannot be valid for the other. If they just shared a session (and a
cookie), then there would be harmony again.
André
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: JSESSIONID doesn't contain the port
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Zsolt Koppany [mailto:zkoppanylist@intland.com]
> Subject: JSESSIONID doesn't contain the port
>
> we have two web applications running on the same host (with
> the same tomcat) but on DIFFERENT ports.
For curiosity's sake, why are you doing that?
> Buf, if one tomcat application refers on URL of the second
> application the browser (FF-2.0.0.14 IE-6) get a NEW a new
> JSESSIONID thus the browser looses its session-id to the
> first application.
In looking at the cookies my browser happens to have stored, I don't see any port number as part of the cookie information, even when created by websites with non-standard ports. Perhaps you have an application error in that either the sending webapp is leaving out the JSESSIONID cookie when constructing the forward or the receiving webapp is arbitrarily creating a new session when it receives the forwarded request.
The above assumes the webapp share the same domain, of course.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org