I use Struts under Websphere 5.0 and I'm getting really weird behaviour. When several users login at the same time, my login action seems to receive the same actionform instance most of the time. This means that a user gets the principal of another user after login. I know that Struts reuses instances, so I implemented the reset() method and made the execute method of the action synchronized. Still no solution ... Any help is more than welcome Thanks in advance
Hi Gunther, I've never seen that kind of problem before. Struts does reuse instances of a form if you keep it in the session scope but each session should get its own instance. The only way I can think of to see the behavior you are seeing is if the form bean used by the action is kept in the application context. I don't think Struts will do that though. Sorry I can't offer you any advice but maybe someone else can. I do have to ask you to change your publicly displayed name -- the second name needs to be spelled out -- so that it conforms with the Naming Policy. We don't have many rules but the one about names is something that we are really particular about around here (the other being "be friendly" ) Regards,
All form beans have session scope. We currently use Struts1.1 beta3. Maybe that's causing the problems. I'll try to convince people to switch to the final 1.1 release, but it's a large project and it's not up to me to decide. Anyway, your help is appreciated.
Joined: Jan 21, 2004
After installing the latest fix-pack for the WebServer-Plugin for Websphere 5, the issue was resolved. We did not (yet) upgrade to the final Struts release.