tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abid Hussain <abid.huss...@abid76.de>
Subject retrieving two different objects from session (should be the same)
Date Thu, 08 May 2008 13:45:29 GMT
Hi everybody,

I'm using tomcat 5.5.9 and am encountering a strange behaviour. I'm not 
sure, if it may be a tomcat issue...

I'm putting an object (called form) into the user's session using 
session.setAttribute() and retrieving it again (after the user has done 
some actions) using session.getAttribute().

Now look at my log messages:
Before putting the object into session:
Put form (modulverwaltung.forms.ModuleForm@10e1567) in session 
(42A90C9AAEE86B81C916F093AAD69452)
After retrieving it from session:
Form (modulverwaltung.forms.ModuleForm@1678aef) has been submitted, got 
it from session (42A90C9AAEE86B81C916F093AAD69452)

As you see the results from calling form.toString() are not the same. 
I've neither overriden toString() nor hashCode() - the methods from 
java.lang.Object are being used. It seems that this behaviour only 
occurs in productive system. In my local system it didn't come up.

Anybody got an idea, how this can happen? Does tomcat modify the objects 
in session somehow...?

Best regards,

Abid


-- 

Abid Hussain
Mail: abid.hussain@abid76.de
Web: http://www.abid76.de

---------------------------------------------------------------------
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


Mime
View raw message