You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Diego Ruotolo <dr...@noemalife.com> on 2014/09/30 12:56:28 UTC

Session lost in Tomcat 5.5.36

Hi everybody,



Working on my company webapp I notice the following problem: sometimes the
jsession cookie is lost, and therefore my whole http session is lost.



The context is:

- Tomcat v. 5.5.36

               - JDK 1.5.0

- O.S. Windows

- Client: Internet Explorer 8



Here is my use case:

-              I made a POST request to a servlet of my webapp

-              While processing this request, I create a new http session

-              Processing of the request will process a velocity template
as last step

-              This velocity template contains 3 calls to 3 different
servlets of my webapp, these 3 calls are made through an HTTP GET

-              While processing one of these 3 requests, Tomcat does not
append jsessionid parameter to the requested URL: I have debugged Tomcat
classes therefore I am sure of this



This problem does not occur always, but just sometimes. While debugging
Tomcat classes, I noticed that Tomcat starts 3 threads to manage the 3 GET
requests of the velocity template, so maybe it is a concurrency problem.

Finally, I noticed that this problem does not happen if I set the Windows
registry key HKCU\Software\Microsoft\Internet Explorer\Main – TabProcGrowth
to 0 or 1, which forces Internet Explorer to use one process for all tabs,
not one process for single tab (which is the default).



Do I miss some configuration settings? Do I have to set some particular
parameter / cookie in the first response (or in the velocity template) ?

If you need more details please tell me.



Thanks in advice,



Kind regards



Diego

R: Session lost in Tomcat 5.5.36

Posted by Diego Ruotolo <dr...@noemalife.com>.
Thanks Daniel,

best regards

Diego

> -----Messaggio originale-----
> Da: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> Inviato: martedì 30 settembre 2014 15:33
> A: Tomcat Users List
> Oggetto: Re: Session lost in Tomcat 5.5.36
>
> On Tue, Sep 30, 2014 at 6:56 AM, Diego Ruotolo <dr...@noemalife.com>
> wrote:
>
> > Hi everybody,
> >
> >
> >
> > Working on my company webapp I notice the following problem:
> sometimes
> > the jsession cookie is lost, and therefore my whole http session is
> > lost.
> >
> >
> >
> > The context is:
> >
> > - Tomcat v. 5.5.36
> >
> >                - JDK 1.5.0
> >
>
> Both of these pieces of software are very old and no longer supported.
> There are very likely bugs and security issues in them which will never
> get
> fixed.  You should consider upgrading ASAP.  As a bonus, upgrading may
> solve the problem you're having.
>
>   http://tomcat.apache.org/tomcat-55-eol.html
>
> Dan
>
>
> >
> > - O.S. Windows
> >
> > - Client: Internet Explorer 8
> >
> >
> >
> > Here is my use case:
> >
> > -              I made a POST request to a servlet of my webapp
> >
> > -              While processing this request, I create a new http
> > session
> >
> > -              Processing of the request will process a velocity
> > template
> > as last step
> >
> > -              This velocity template contains 3 calls to 3 different
> > servlets of my webapp, these 3 calls are made through an HTTP GET
> >
> > -              While processing one of these 3 requests, Tomcat does not
> > append jsessionid parameter to the requested URL: I have debugged
> > Tomcat classes therefore I am sure of this
> >
> >
> >
> > This problem does not occur always, but just sometimes. While
> > debugging Tomcat classes, I noticed that Tomcat starts 3 threads to
> > manage the 3 GET requests of the velocity template, so maybe it is a
> concurrency problem.
> >
> > Finally, I noticed that this problem does not happen if I set the
> > Windows registry key HKCU\Software\Microsoft\Internet Explorer\Main –
> > TabProcGrowth to 0 or 1, which forces Internet Explorer to use one
> > process for all tabs, not one process for single tab (which is the
> > default).
> >
> >
> >
> > Do I miss some configuration settings? Do I have to set some
> > particular parameter / cookie in the first response (or in the velocity
> template) ?
> >
> > If you need more details please tell me.
> >
> >
> >
> > Thanks in advice,
> >
> >
> >
> > Kind regards
> >
> >
> >
> > Diego
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session lost in Tomcat 5.5.36

Posted by Daniel Mikusa <dm...@pivotal.io>.
On Tue, Sep 30, 2014 at 6:56 AM, Diego Ruotolo <dr...@noemalife.com>
wrote:

> Hi everybody,
>
>
>
> Working on my company webapp I notice the following problem: sometimes the
> jsession cookie is lost, and therefore my whole http session is lost.
>
>
>
> The context is:
>
> - Tomcat v. 5.5.36
>
>                - JDK 1.5.0
>

Both of these pieces of software are very old and no longer supported.
There are very likely bugs and security issues in them which will never get
fixed.  You should consider upgrading ASAP.  As a bonus, upgrading may
solve the problem you're having.

  http://tomcat.apache.org/tomcat-55-eol.html

Dan


>
> - O.S. Windows
>
> - Client: Internet Explorer 8
>
>
>
> Here is my use case:
>
> -              I made a POST request to a servlet of my webapp
>
> -              While processing this request, I create a new http session
>
> -              Processing of the request will process a velocity template
> as last step
>
> -              This velocity template contains 3 calls to 3 different
> servlets of my webapp, these 3 calls are made through an HTTP GET
>
> -              While processing one of these 3 requests, Tomcat does not
> append jsessionid parameter to the requested URL: I have debugged Tomcat
> classes therefore I am sure of this
>
>
>
> This problem does not occur always, but just sometimes. While debugging
> Tomcat classes, I noticed that Tomcat starts 3 threads to manage the 3 GET
> requests of the velocity template, so maybe it is a concurrency problem.
>
> Finally, I noticed that this problem does not happen if I set the Windows
> registry key HKCU\Software\Microsoft\Internet Explorer\Main – TabProcGrowth
> to 0 or 1, which forces Internet Explorer to use one process for all tabs,
> not one process for single tab (which is the default).
>
>
>
> Do I miss some configuration settings? Do I have to set some particular
> parameter / cookie in the first response (or in the velocity template) ?
>
> If you need more details please tell me.
>
>
>
> Thanks in advice,
>
>
>
> Kind regards
>
>
>
> Diego
>

Re: Session lost in Tomcat 5.5.36

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Diego,

On 9/30/14 6:56 AM, Diego Ruotolo wrote:
> Working on my company webapp I notice the following problem:
> sometimes the jsession cookie is lost, and therefore my whole http
> session is lost.
> 
> The context is:
> 
> - Tomcat v. 5.5.36
> 
> - JDK 1.5.0
> 
> - O.S. Windows
> 
> - Client: Internet Explorer 8
> 
> Here is my use case:
> 
> -              I made a POST request to a servlet of my webapp
> 
> -              While processing this request, I create a new http
> session

Did a session exist before this, or is the first time a session is
being created?

> -              Processing of the request will process a velocity
> template as last step
> 
> -              This velocity template contains 3 calls to 3
> different servlets of my webapp, these 3 calls are made through an
> HTTP GET

How (specifically) does your Velocity template make these 3 calls to
other pages?

> -              While processing one of these 3 requests, Tomcat
> does not append jsessionid parameter to the requested URL: I have
> debugged Tomcat classes therefore I am sure of this

How are the URLs for these requests generated?

> This problem does not occur always, but just sometimes. While
> debugging Tomcat classes, I noticed that Tomcat starts 3 threads to
> manage the 3 GET requests of the velocity template, so maybe it is
> a concurrency problem.

If Tomcat is creating the threads, then they are being used to handle
the requests from a server perspective, not a client perspective. So,
if your Velocity template "includes" 3 resources and uses 3 separate
threads to fetch that data using a loopback request to Tomcat, then
the threads are either being launched by your code of Velocity, not
Tomcat.

> Finally, I noticed that this problem does not happen if I set the
> Windows registry key HKCU\Software\Microsoft\Internet Explorer\Main
> – TabProcGrowth to 0 or 1, which forces Internet Explorer to use
> one process for all tabs, not one process for single tab (which is
> the default).

When your template evaluates, does it open extra tabs or something? It
would seem that the above setting in the Windows registry shouldn't
change anything that happens on the server if only a single request is
being handled.

> Do I miss some configuration settings? Do I have to set some
> particular parameter / cookie in the first response (or in the
> velocity template) ?
> 
> If you need more details please tell me.

It's hard to understand what's going on, here. Can you give a lot more
detail? Take us step-by-step through the process, and be as specific
as possible.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJULGcOAAoJEBzwKT+lPKRYNrwP/3H95QkHRDCbCvo0P92P9wav
fZ+EsQQToN3EJv2aX2KCpmuj3orkwLols5rg1dEEt2aqlcLr4kc7i+fR2V5euW1o
HXqr9dtQbzUQcqMD+8wfW0oGyXmr4F+t1ywaODF2zi9T3tG+JDQ6c9TYE1qWdkdL
/BJWkewOK+19ZueqYndae1Jwpu/nVdPV21MSt5j9LQk1cJwsWEqw48f46HzrNJ/2
6mRLVs0hEqyXg/G+XR8b77/2RdnWW7tV3wRbqLdj3uE4/6QNFQBQbhtprAo6LtOD
IZhKtNSyRMpZadvxHBSdUzEXrPZPNJ+jOma4M9mZyy4GEH90lkoM+qo8JLC3gO1H
kfauuiPK5H++9j5/pda/ZbgdU4qbB2cKLf28uzqQjLIIpLMbm1XBuYo1fUX3vizq
pCkgfL4Q8hMfoqQKe89AfcURsLU52LuGEknU5vb/1ZyqamHlFG1Iu3pUlylrcTrN
vx/suvTzAjYbzOfaUBHpywW1LAGyvEVj//uyR6aUmCkzOLyNvoAFQCx1cUZkZ31/
Ajm4IL2VOWgacFfrTPy22X4hWF+/v9u0l4uJRVuWJnARjs3pNh17hmttpFyWTVI7
GxY0yI8Xligyr4A0B6mETWewKzwJwznJA1WUCK0e5HUTAdUMtaD8V7AXy2mackr/
N+S8vNrZQf6MQMHdRD9D
=m1Pi
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org