This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
<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.
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 ]
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.