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 have a JSP page in which there are 2 html forms each associated with a particular form bean . Once I submit the page i need to get both the form beans in my action class. can anyone give some pointers
In Struts, the action parameter of an <html:form> tag is an action defined in the struts-config.xml file. Each action is associated with a particular form.
However, there's no reason you can't have two struts actions that both use the same action class. In this case, the action class can decide which form bean to cast it's ActionForm input parameter to.
For example, let's suppose your action class is a subclass of DispatchAction, which means that it will forward to different methods named for the contents of a specified input field, such as "edit" or "delete". In this case, both the edit() and delete() methods can cast to different suclasses of ActionForm.