You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zufeng Huang <po...@yahoo.com> on 2008/05/17 15:11:31 UTC

problem about tomcat session management

Hi all,
   
  Recently, I am suffering a problem about tomcat session management. It is a sign-in service, sometimes the user A logs in, system sets user¡¯s information in session and then a piece of JSP codes to read the user¡¯s name from session, but the user gets another user¡¯s name in browser. I cannot repeat this problem in our network environment, but our customers meet(NOT ALWAYS).
   
  Our service environment: centos V4, jdk1.5.0_07, tomcat5.5.15. Other skills we used include struts, dwr, hibernate, and etc.
   
  If need the service codes, let me know. Thanks for any help and suggestion.
   

       

Re: problem about tomcat session management

Posted by Bill Barker <wb...@wilshire.com>.
"Christopher Schultz" <ch...@christopherschultz.net> wrote in message 
news:482EE933.5020501@christopherschultz.net...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Zufeng,
>
> Zufeng Huang wrote:
> | Recently, I am suffering a problem about tomcat session management.
> | It is a sign-in service, sometimes the user A logs in, system sets
> | user��s information in session and then a piece of JSP codes to read
> | the user��s name from session, but the user gets another user��s name
> | in browser. I cannot repeat this problem in our network environment,
> | but our customers meet(NOT ALWAYS).
>
> This is almost certainly an application error. You should make sure that
> you are not storing references to HttpServletRequest or HttpSession
> objects /anywhere/ that might be shared with another thread.
> Specifically, check that your servlets do not have any class-level 
> members.
>

Actually, since the OP can't reproduce it on his network, I'd vote for an 
up-stream proxy server returning a cached view of the page.  Of course 
Tomcat will take care of this for protected pages if you are using Container 
Auth, but it doesn't sound like this app is doing that.

> | Our service environment: centos V4, jdk1.5.0_07, tomcat5.5.15.
>
> You might want to upgrade to Tomcat 5.5.26, which is the latest 5.5.x
> version available.
>

Always a good suggestion, since there are quite a few fixes from 5.5.15 :).

> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkgu6TMACgkQ9CaO5/Lv0PBXygCgmCIc2dG4YnBHBn0jCrKW02hx
> prMAoKhVNE1XxgDUpTS7PEzmaKVLnDSZ
> =jMBi
> -----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: problem about tomcat session management

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

Zufeng,

Zufeng Huang wrote:
| Recently, I am suffering a problem about tomcat session management.
| It is a sign-in service, sometimes the user A logs in, system sets
| user¡¯s information in session and then a piece of JSP codes to read
| the user¡¯s name from session, but the user gets another user¡¯s name
| in browser. I cannot repeat this problem in our network environment,
| but our customers meet(NOT ALWAYS).

This is almost certainly an application error. You should make sure that
you are not storing references to HttpServletRequest or HttpSession
objects /anywhere/ that might be shared with another thread.
Specifically, check that your servlets do not have any class-level members.

| Our service environment: centos V4, jdk1.5.0_07, tomcat5.5.15.

You might want to upgrade to Tomcat 5.5.26, which is the latest 5.5.x
version available.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgu6TMACgkQ9CaO5/Lv0PBXygCgmCIc2dG4YnBHBn0jCrKW02hx
prMAoKhVNE1XxgDUpTS7PEzmaKVLnDSZ
=jMBi
-----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