Vili,
By changing the scope to session, you are now operating on the same instance of the ActionForm in both Actions. This may be a solution that you can live with but I think
you should still evaluate how you have assigned responsibilities. Using session scoped ActionForms has its own set of gotchas.
Here's something that you should be aware of regarding the session-scoped ActionForm. Action2 appears to be aware of the changes made to the ActionForm in Action1 because your request most likely only has the userId parameter. When you prepopulate the form in Action1, the values are not disturbed when the Struts request-response cycle is repeated when you forward to Action2 because Struts did not find any request parameters that matched the other detail fields; only userId was present and the same value that was pushed in to the form in Action1 was pushed in to the form for Action2. However, if there were any request parameters that matched other detail form fields, those parameter values would still overwrite any values you prepopulated in Action1.
Here's an experiment you could try to see this happening.
In the JSP where you select a user from a list, add a hidden field using one of the detail property names, say "firstName".
You will see that even though you have changed the scope to session, whatever value you populate firstName with in Action1 will be overwritten with "FROMREQUEST" in Action2.
IMO, it would serve you well now and in the future to really understand what was going on in the first place and see if session-scoped forms are really the way to go or if a refactoring of responsibilities assigned to Action classes would be a better choice.
[ April 16, 2004: Message edited by: Junilu Lacar ]