<pre>name: Must have a unique bean name. This name is used as reference in the action mappings. <b>Often, this is also the name of the request or the session attribute under which the form is stored.</b> </pre>
But in case if I want to set two different references of the form beans in the request and session scope then what will the aproach.
e.g. one of the property of form bean, I want to skip from the session scope reference.
Joined: Mar 23, 2006
form beans can be either request or session scope.
In your controller class, do your calculations, and then put for request objects or for session objects.
Just make sure you have scope set to the instance you want, and you'll have access to it. Just point all struts name parameters at the bean:define id parm, and you can yank whatever you want out of it.
There's probably an easier way to do this, but that's how I do it. [ March 24, 2006: Message edited by: Frank Bueckert ]
Joined: Feb 15, 2005
Trying to keep a copy of the ActionForm bean in both the request and the session at the same time would be a very bad idea. Struts would read one or the other (I'm not really sure which) but not both. I'm not sure what you're trying to accomplish by doing this, but I suggest finding another way to accomplish the same thing.