You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mario Ivankovits <ma...@ops.co.at> on 2003/11/25 12:49:38 UTC
[OT] Mozilla/Firebird and Session Cookie Problem
Hello !
For sure, not the right mailinglist, but maybe someone has experienced
the same:
If i use Firebird 0.7 (Windows) to connect to our Tomcat 4.1.24 Server,
a new session cookie is retrieved.
So long, this is correct ....
But if i start a second instance of Firebird (not tabbed !!!), the
_SAME_ session cookie (got from the first firebird instance) is sent to
the server, so there is no new session created.
With this behaviour, it is not possible to use more than one instance of
Firebird to work with our web-application, due to the session values,
which will be shared then.
Any hints?
Mario
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Ben Souther <bp...@adelphia.net>.
BTW: You can also run into this problem with MSIE.
If you start a new instance of MSIE from taskbar or the icon on the desktop,
it will run with it's own session cookie. If, however, the user starts a new
instance with ctl+n or by using file -> new window then both instances share
the same session cookie.
This caused a lot of problems for me while working for a company who made a
financial planning application. If the planner, who was working with one
client's portfolio, took a call from another client and checked their account
by using ctl+n to open a new browser, he would go back to the original
instance that he was working with and find that it was now logged into the
second client's account. It was especially problematic if there was a form
already filled out and waiting to be submitted with the first client's data.
One solution that we toyed with was to store the JSP SessionId in a hidden
form variable and make sure that it matches the the user's session Id before
processing any form information.
I put this in the same category as the "Back Button".
On Thursday 27 November 2003 09:01 am, you wrote:
> The simple kludge is to utilize multiple names for the same tomcat
> instance. http://i.mycompany.com/webapp1/
> http://need.mycompany.com/webapp1/
> http://more.mycompany.com/webapp1/
> http://cowbell.mycompany.com/webapp1/
>
> And all you need to do is mess with your /etc/hosts file. (Or
> c:\winnt\blah\blah\blah\HOSTS file)
>
> -Tim
>
> Mario Ivankovits wrote:
> > Hello !
> >
> >> This whole question about sharing the session cookies or not when you
> >> open a new window seems a bit unnecessary to me. I often want to test
> >> using two users and not share the cookies, but I just open a different
> >> browser, e.g. if I'm using Mozilla, I open IE or Netscape4 or Firebird
> >> or Opera. So there's up to five seperate sessions you can have without
> >> even having to think about it.
> >
> > I think it is worth the discussion. I am a Web-Application developer and
> > our users loves it to login to our application multiple times. I do not
> > want to
> > 1) Create a profile for each instance
> > 2) Install multiple browsers
> >
> > Both is hard in support.
> >
> >
> > On the other hand, we have implemented different applications, where
> > every application has its own login. Having the same session-cookie,
> > login is
> > 1) not possible, since there is another application already active with
> > this session
> > or
> > 2) destroys the session values of the first application
> >
> > However, session-cookie handling like IE should be IMHO possible with
> > Mozilla at all.
> > If you press Ctrl-N in IE you use the same session-cookie (even if i do
> > not like this behaviour, i can live with).
> >
> > At least, if i start IE again (via Icon on Desktop) a new session cookie
> > will be retrieved. This is what Mozilla should do too.
> >
> >
> > Mario
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: config 302 redirect ?
Posted by Tim Funk <fu...@joedog.org>.
Tomcat doesn't have an option like that. Which is why we usually recommend
using apache's ModRewrite, Redirect, ...
You could write a filter which does that.
-Tim
P.van Kemenade wrote:
> Hi
>
> what is the correct way to redirect users to a completely different
> server when they try to acces some address ? I'm looking for a
> config option (in server.xml or web.xml) that will return a http
> redirect header, like apache's Redirect directive.
>
> when people ask for
> http://mydomain.com/gohere/
> or
> http://mydomain.com/gohere/bla/bla
>
> I want them to go
> http://yourdomain.com/gosomewhereelse
> and
> http://yourdomain.com/gosomewhereelse
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: config 302 redirect ?
Posted by "P.van Kemenade" <pi...@kw.nl>.
Hi
> Sorry but I don't understand what you are trying to do,
> could you be more explicit, then maybe we can help :-)
dont bother, it was just a dumb idea.
the problem was, I had one tomcat (A) pointing at
/usr/local/websites and another one (B) pointing at
/usr/local/websites/mmbase
mmbase is a product that ships with it's own
tomcat and I wanted to keep it like that. however,
if the first tomcat (A) saw the jsp files located
under /usr/local/websites/mmbase, it would barf
and complain. so I wanted to redirect /mmbase on A
to another port, on which the second tomcat (B)
runs.
which is probably just dumb. I'm taken the puzzle apart now.
thanks,
*pike
=========
Help stop world hunger -- visit
<http://www.thehungersite.org>
Is The Hunger Site real?
<http://www.umich.edu/~virus-busters/hunger.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: config 302 redirect ?
Posted by Luke Vanderfluit <lu...@chipcity.com.au>.
Hi,
Sorry but I don't understand what you are trying to do,
could you be more explicit, then maybe we can help :-)
kind regrards,
Luke
> my real problem is, I have two different
> tomcats looking at the same folders.
> for each tomcat, I would like
> folder A to redirect to tomcat A
> folder B to redirect to tomcat B
> that's why I was looking for config options.
>
> I'll just have to change the setup.
>
> thanks,
> *-pike
> ============
> http://www.fogscreen.com/
>
> .. tv in thin air ..
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
--
====================================
"when my computer smiles, I'm happy"
===============================.~ ~,
Luke Vanderfluit |'/']
Mobile: 0421 276 282 \~/`
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: config 302 redirect ?
Posted by Pike <pi...@kw.nl>.
Hi
>> Tomcat doesn't have an option like that.
strange!
> There are a number of ways:
> 1. using the "Refresh" header,
> 2. using the "Location" header,
yes. hm. my real problem is, I have two different
tomcats looking at the same folders.
for each tomcat, I would like
folder A to redirect to tomcat A
folder B to redirect to tomcat B
that's why I was looking for config options.
I'll just have to change the setup.
thanks,
*-pike
============
http://www.fogscreen.com/
.. tv in thin air ..
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: config 302 redirect ?
Posted by Luke Vanderfluit <lu...@chipcity.com.au>.
Hi P.,
There are a number of ways:
1. using the "Refresh" header,
2. using the "Location" header,
these you can do using META tags
as in
<meta http-equiv="Refresh" Content="3;http://mydomain.com/gohere"
or using the servlet API as in
response.setHeader("Refresh", "3;http://mydomain.com/gohere");
response.setHeader("Location", "http://mydomain.com/gohere");
response.sendRedirect("http://mydomain.com/gohere");
or when redirecting to another resource you can do:
ServletContext context = getServletContext();
RequestDispatcher rd =
context.getRequestDispatcher("otherServletOrJSPOrHtml");
rd.forward(request, response);
hope this helps,
kind regards,
Luke
On Fri, 2003-11-28 at 01:10, P.vanKemenade wrote:
> Hi
>
> what is the correct way to redirect users to a completely different
> server when they try to acces some address ? I'm looking for a
> config option (in server.xml or web.xml) that will return a http
> redirect header, like apache's Redirect directive.
>
> when people ask for
> http://mydomain.com/gohere/
> or
> http://mydomain.com/gohere/bla/bla
>
> I want them to go
> http://yourdomain.com/gosomewhereelse
> and
> http://yourdomain.com/gosomewhereelse
>
> thanks,
> *pike
> ============
> "I wasted time, and now doth time waste me"
>
> http://framework.v2.nl/archive/archive/node/text/default.py/nodenr-67731
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
--
====================================
"when my computer smiles, I'm happy"
===============================.~ ~,
Luke Vanderfluit |'/']
Mobile: 0421 276 282 \~/`
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
config 302 redirect ?
Posted by "P.van Kemenade" <pi...@kw.nl>.
Hi
what is the correct way to redirect users to a completely different
server when they try to acces some address ? I'm looking for a
config option (in server.xml or web.xml) that will return a http
redirect header, like apache's Redirect directive.
when people ask for
http://mydomain.com/gohere/
or
http://mydomain.com/gohere/bla/bla
I want them to go
http://yourdomain.com/gosomewhereelse
and
http://yourdomain.com/gosomewhereelse
thanks,
*pike
============
"I wasted time, and now doth time waste me"
http://framework.v2.nl/archive/archive/node/text/default.py/nodenr-67731
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Tim Funk <fu...@joedog.org>.
The simple kludge is to utilize multiple names for the same tomcat instance.
http://i.mycompany.com/webapp1/
http://need.mycompany.com/webapp1/
http://more.mycompany.com/webapp1/
http://cowbell.mycompany.com/webapp1/
And all you need to do is mess with your /etc/hosts file. (Or
c:\winnt\blah\blah\blah\HOSTS file)
-Tim
Mario Ivankovits wrote:
> Hello !
>
>> This whole question about sharing the session cookies or not when you
>> open a new window seems a bit unnecessary to me. I often want to test
>> using two users and not share the cookies, but I just open a different
>> browser, e.g. if I'm using Mozilla, I open IE or Netscape4 or Firebird
>> or Opera. So there's up to five seperate sessions you can have without
>> even having to think about it.
>
>
> I think it is worth the discussion. I am a Web-Application developer and
> our users loves it to login to our application multiple times. I do not
> want to
> 1) Create a profile for each instance
> 2) Install multiple browsers
>
> Both is hard in support.
>
>
> On the other hand, we have implemented different applications, where
> every application has its own login. Having the same session-cookie,
> login is
> 1) not possible, since there is another application already active with
> this session
> or
> 2) destroys the session values of the first application
>
> However, session-cookie handling like IE should be IMHO possible with
> Mozilla at all.
> If you press Ctrl-N in IE you use the same session-cookie (even if i do
> not like this behaviour, i can live with).
>
> At least, if i start IE again (via Icon on Desktop) a new session cookie
> will be retrieved. This is what Mozilla should do too.
>
>
> Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 11/27/2003 12:22 PM Mario Ivankovits wrote:
> If i start Excel two times, i also have to know which excel is what
> sheet. I think this is something which a user, who uses this feature,
> is familiar with. And mostley then, the are in different sections of
> the application, or, the would like to compare some settings, and
> switch betweend these windows.
>
> Maybe i miss something, but every web-app, that stores some state
> informations in their session do have problems with multiple logins
> and mozilla, problems which are not known with IE. Currently the only
> solution i have found, is to use url-rewriting, then the behavior is
> as expected.
>
> And well then, why should the behaviour between url-rewriting and
> session-cookie be different?
>
> IMHO At least, this should be configureable.
Well good luck getting that implemented. I'm not sure I would vote for
it, I have about 5 bugs I reported myself that are stopping me from
using Mozilla at all for development right now. :(
Adam
--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Mario Ivankovits <ma...@ops.co.at>.
Adam Hardy wrote:
> Are you sure about that? Without checking, I think that the jsessionid
> cookie would be stored under the directory
> http://www.mydomain.com/myapp1/ and the next app on the same server
> should have it at http://www.mydomain.com/myapp2/
Well, this might be, but our application was developed in an pre-tomcat
time, and during porting to tomcat, we have decided to use only one WEB-APP.
The pro is, we have to deploy only one jar and all applications are
up-to-date, and only one web.xml has to be maintained.
The con is, the above suggestion wont work for us.
> As far as the discussion goes, I appreciate where you are coming from,
> but as someone already mentioned on that thread, how can somebody tell
> which window is which login when they use IE to have multiple logins?
> It must be particular to your application, I suppose.
>
If i start Excel two times, i also have to know which excel is what
sheet. I think this is something which a user, who uses this feature, is
familiar with. And mostley then, the are in different sections of the
application, or, the would like to compare some settings, and switch
betweend these windows.
Maybe i miss something, but every web-app, that stores some state
informations in their session do have problems with multiple logins and
mozilla, problems which are not known with IE.
Currently the only solution i have found, is to use url-rewriting, then
the behavior is as expected.
And well then, why should the behaviour between url-rewriting and
session-cookie be different?
IMHO At least, this should be configureable.
Ciao,
Mario
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 11/27/2003 10:57 AM Mario Ivankovits wrote:
> Hello !
>
>> This whole question about sharing the session cookies or not when
>> you open a new window seems a bit unnecessary to me. I often want
>> to test using two users and not share the cookies, but I just open
>> a different browser, e.g. if I'm using Mozilla, I open IE or
>> Netscape4 or Firebird or Opera. So there's up to five seperate
>> sessions you can have without even having to think about it.
>
>
> I think it is worth the discussion. I am a Web-Application developer
> and our users loves it to login to our application multiple times. I
> do not want to 1) Create a profile for each instance 2) Install
> multiple browsers
>
> Both is hard in support.
>
>
> On the other hand, we have implemented different applications, where
> every application has its own login. Having the same session-cookie,
> login is 1) not possible, since there is another application already
> active with this session
Are you sure about that? Without checking, I think that the jsessionid
cookie would be stored under the directory
http://www.mydomain.com/myapp1/ and the next app on the same server
should have it at http://www.mydomain.com/myapp2/
As far as the discussion goes, I appreciate where you are coming from,
but as someone already mentioned on that thread, how can somebody tell
which window is which login when they use IE to have multiple logins? It
must be particular to your application, I suppose.
Adam
--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Mario Ivankovits <ma...@ops.co.at>.
Hello !
> This whole question about sharing the session cookies or not when you
> open a new window seems a bit unnecessary to me. I often want to test
> using two users and not share the cookies, but I just open a different
> browser, e.g. if I'm using Mozilla, I open IE or Netscape4 or Firebird
> or Opera. So there's up to five seperate sessions you can have without
> even having to think about it.
I think it is worth the discussion. I am a Web-Application developer and
our users loves it to login to our application multiple times. I do not
want to
1) Create a profile for each instance
2) Install multiple browsers
Both is hard in support.
On the other hand, we have implemented different applications, where
every application has its own login. Having the same session-cookie,
login is
1) not possible, since there is another application already active with
this session
or
2) destroys the session values of the first application
However, session-cookie handling like IE should be IMHO possible with
Mozilla at all.
If you press Ctrl-N in IE you use the same session-cookie (even if i do
not like this behaviour, i can live with).
At least, if i start IE again (via Icon on Desktop) a new session cookie
will be retrieved. This is what Mozilla should do too.
Mario
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
This whole question about sharing the session cookies or not when you
open a new window seems a bit unnecessary to me. I often want to test
using two users and not share the cookies, but I just open a different
browser, e.g. if I'm using Mozilla, I open IE or Netscape4 or Firebird
or Opera. So there's up to five seperate sessions you can have without
even having to think about it.
Adam
On 11/26/2003 09:38 PM Antonio Fiol Bonnín wrote:
> What is the behaviour on other browsers? (MSIE, Opera, ...)
>
> Antonio Fiol
>
> Mario Ivankovits wrote:
>
>> Just for the records:
>>
>> Someone on mozillazine told me, this is an open bug/enhancement
>>
>> http://bugzilla.mozilla.org/show_bug.cgi?id=117222
>>
>> Maybe we should vote on it.
>>
>>
>> Ciao,
>> Mario
--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Antonio Fiol Bonnín <fi...@terra.es>.
What is the behaviour on other browsers? (MSIE, Opera, ...)
Antonio Fiol
Mario Ivankovits wrote:
> Just for the records:
>
> Someone on mozillazine told me, this is an open bug/enhancement
>
> http://bugzilla.mozilla.org/show_bug.cgi?id=117222
>
> Maybe we should vote on it.
>
>
> Ciao,
> Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [OT] Mozilla/Firebird and Session Cookie Problem (Mozilla-BUG)
Posted by Mario Ivankovits <ma...@ops.co.at>.
Just for the records:
Someone on mozillazine told me, this is an open bug/enhancement
http://bugzilla.mozilla.org/show_bug.cgi?id=117222
Maybe we should vote on it.
Ciao,
Mario
Re: [OT] Mozilla/Firebird and Session Cookie Problem
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 11/25/2003 01:45 PM Mario Ivankovits wrote:
> Ben Souther wrote:
>
>> I'm not that familiar with Firebird, but I know that Mozilla allows
>> you to create different profiles, each having it's own space for
>> storing cookies.
>> Have you tried running two instances with different profiles?
>>
>>
> I havent found profiles in firebird, but i am pretty sure, that this
> might work, however, i dont want to switch the profile.
> There has to be another way.
>
> Thanks!
> Mario
Hi Mario,
in Mozilla you can block cookies from a particular site, so if you block
the cookies for your site, then the session info will either be
rewritten to the URLs (URL rewriting) or will not be sent at all,
depending on the application you are using.
Adam
--
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: [OT] Mozilla/Firebird and Session Cookie Problem
Posted by Mario Ivankovits <ma...@ops.co.at>.
Ben Souther wrote:
>I'm not that familiar with Firebird, but I know that Mozilla allows you to
>create different profiles, each having it's own space for storing cookies.
>Have you tried running two instances with different profiles?
>
>
I havent found profiles in firebird, but i am pretty sure, that this
might work, however, i dont want to switch the profile.
There has to be another way.
Thanks!
Mario
Re: [OT] Mozilla/Firebird and Session Cookie Problem
Posted by Ben Souther <bp...@adelphia.net>.
I'm not that familiar with Firebird, but I know that Mozilla allows you to
create different profiles, each having it's own space for storing cookies.
Have you tried running two instances with different profiles?
On Tuesday 25 November 2003 06:49 am, you wrote:
> Hello !
>
> For sure, not the right mailinglist, but maybe someone has experienced
> the same:
>
> If i use Firebird 0.7 (Windows) to connect to our Tomcat 4.1.24 Server,
> a new session cookie is retrieved.
> So long, this is correct ....
> But if i start a second instance of Firebird (not tabbed !!!), the
> _SAME_ session cookie (got from the first firebird instance) is sent to
> the server, so there is no new session created.
>
> With this behaviour, it is not possible to use more than one instance of
> Firebird to work with our web-application, due to the session values,
> which will be shared then.
>
>
> Any hints?
> Mario
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org