This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm seeing a behavior in Struts 1.3.10 and didn't happen in Struts 1.1. If I already have a form bean in scope (in my case session scope) and it is of a different type than what is defined in the <form-bean> definition in struts-config.xml, Struts will replace it! The user manual says:
Check for an instance of a bean of the appropriate class, under the appropriate key, in the appropriate scope (request or session).
If there is no such bean instance available, a new one is automatically created and added to the appropriate scope (request or session).
I suppose if I take the "of the appropriate class" phrase literally, then it seems to be the correct behavior, but then they go on to say "created and added" which is ambiguous. I'd feel better if I can find something that says explicitly that a form bean in session scope can be replaced. Can anyone confirm or deny this behavior? Thanks!