I have application that use Struts2. This application have links to pages that contain forms. Those links run actions that prepare page with some initiations in method start. Bellow part of struts.xml:
<action name="linkToPage1" class="Bean1Action" method="start">
<result name="succes">/page1.jsp</result>
</action>
<action name="linkToPage2" class="Bean2Action" method="start">
<result name="succes">/page2.jsp</result>
</action>
Those pages are quite complex so they need initiations in method start.
page1.jsp:
<s:form action="form1submit">
...
<s:submit ... >
</s:form>
page2.jsp:
<s:form action="form2submit">
...
<s:submit ... >
</s:form>
Those forms invoke next actions:
<action name="form1submit" class="Bean1Action" method="submit">
<result name="succes">/succesInfo.jsp</result>
</action>
<action name="form2submit" class="Bean2Action" method="submit">
<result name="succes">/succesInfo.jsp</result>
</action>
I want to make one page that contain both mentioned forms, and with submit for each form. It is not problem to create new .jsp page and copy forms form page1.jsp and page2.jsp, but with link to this new page. The new link have to run both: Bean1Action.start() and Bean2Action.start() method. How to run both initiations? I dont want to change Beans. I prefer to reslove it by struts.xml and .jsp files.