You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mathew, Manoj" <Ma...@principal.com> on 2004/01/29 16:38:33 UTC

multiple action forms in a single jsp

Hi

I am having multiple action forms in a single jsp and wondering how to give multiple form names in the mappings.
	<action path="/saveAdd" type="com.group.myproject.ui.module1.SaveAndAddMemberAction" 					name="form1" scope="request" input="my.jsp">
			<forward name="success" path="/my.jsp" />
			<forward name="failure" path="/my.jsp" />
	</action>

here my.jsp has form1,form2,form3 and form 4 and i want my action "saveAdd" to access all these forms and execute some functions.
1. How will i specify multiple forms in the strutsconfig mapping
2.How can i access each forms in my actions since the scope is request.
      public ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception {
	form1 frm = (form1) form;

but how will i get other forms?

Thank-you,
Manoj Mathew



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org