<bean:message key="button.save"/>
</html:submit>
type="com.company.project.web.admin.ThingAction"
name="thingForm"
validate="true"
input="thing.layout"
scope="request"
parameter="method"> ********
<forward name="success" path="/admin/editThing.do?method=Edit"/>
<forward name="edit" path="/admin/editThing.do?method=Edit"/>
<forward name="add" path="/admin/addThing.do?method=Add"/>
</action>
-----Original Message-----
From: Sunil Narvekar [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 12:10 PM
To: Research Triangle Java User's Group mailing list.
Subject: [Juglist] Struts questionI have a JSP form with three submit buttons on it such as Update, Delete and Abort.
I created struts action classes .. UpdateAction, DeleteAction and AbortAction with an execute() method in each of them which performs the necessary action.
How do I setup the struts configuration file, so that each time I press a submit button, it performs the intended action. For example, when Update button is pressed - invoke UpdateAction's execute() method.
I know one way of doing this is by using the org.apache.struts.actions.LookupDispathAction class. It requires you to write one class with multiple methods(for example update(), delete() and abort()), where one of the methods will be invoked based on value of a special request parameter sprcified in the configuration file.
What if I do not want to combine the several actions in one class, but have one action class for each submit button on the JSP page?. Please let me know if anyone has done this. This is my first Struts project.
Thanks
Sunil Narvekar
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org
