Riyad, You should not be using the Session object to store your DTO for display. Especially if you are forwarding the request to a JSP. The Session object should only be used to store data that is required to remain in server memory between client requests. I would place your DTO in the Request object instead. That alone will probably solve your problem.
Now, assuming you continue to use the Session object, you should synchronize on the Session object before attempting to add your DTO object to it. That will prevent multiple requests from stepping on each other while trying to add their DTOs to the Session. I haven't looked at Tomcat's code to see how they implemented the hashCode method of the Session object but it's not the best way to determine if two Sessions are equal in your case. The hash code may depend on the contents of the Session object. I would print out the session ID instead. This will truely tell you if you have two different sessions. From what you describe I find it hard to beleive that you there is a second session creeping into the picture within the same request. -- Virtually, Andre Van Klaveren SCP --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
