[send in copy on Struts-dev list]
In ActionServlet (Struts 1.0.2) you can read that formBean object found in scope is compared to the form name declared in ActionMapping by testing class name, not testing it using an "isInstance" or any other reflection mecanism that could allow using inheritance or abstract FormBeans. instance = (ActionForm) session.getAttribute(attribute); ... className = formBean.getType(); ... className.equals(instance.getClass().getName())) { Can any Struts developper explain if there is a technical reason to this limitation ? > Hello all, I a mwondering about this ? > > I have a form bean declared abstract and I have subclassed it > into three concrete form bean classes that I use, this works OK. > > Then, I want now, to use an action that does not require to know > anything about these concretes implementations: I want my > action to work on the interface of the abstract form, for this > I have declared an action-mapping to use a form bean > of the abstract class and from the session scope, I thought > that struts won't try to create the form again (actually it > can't because the form class is abstract), infortunatelly > the logs of struts told me that struts have tried to create > it. > > My question is why do struts try to recreate the action form > if it can be found from the session > > ============================================================= > -- KeV -- > ============================================================= > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>