I think you need to take a step back and understand how http works. Per each request, only one html form can be submitted(whether it's a get or a post). This is not specific to Struts, Java or any web server solutions. Your design is flawed, but it doesn't pertain to Struts. You can have more than one form one a page, but only one will be submitted in the request.

-Ben

From: "Mathew, Manoj" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: multiple action forms in a single jsp
Date: Thu, 29 Jan 2004 09:38:33 -0600

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Scope out the new MSN Plus Internet Software � optimizes dial-up to the max! http://join.msn.com/?pgmarket=en-us&page=byoa/plus&ST=1



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to