struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riyad Kalla <...@email.arizona.edu>
Subject Re: Multiple action for one (1) form
Date Fri, 30 Apr 2004 00:36:56 GMT
Yes with the html:submit, something like:

<html:form action="/your/path/addUser.do">
    <html:submit />
</html:form>

then in your struts-config:
<action
    name="userForm"
    path="/your/path/addUser"
    type="your.package.AddUserAction">
    <forward name="success" path="/userSuccessfullyAdded.jsp" />
    <forward name="failure" path="/userAddFailed.jsp" />
</action>

Samuel Rochas wrote:

> Helle Riyad,
>
>> And then you setup your 3 actions in your struts-config:
>> <action name="userForm" type="AddUser" validate="true" />
>> <action name="userForm" type="EditUser" validate="true" />
>> <action name="userForm" type="RemoveUser" validate="false" />
>
> Ok. How do I trigger the action type in the jsp file? In the 
> html:submit tag?
>
> Does that mean, I have the following classes: AddUserAction, 
> EditUserAction and RemoveUserAction?
>
> Sincerly
> Samuel
>
> ---  andinasoft SA - Software y Consulting  ---
> Mariano Aguilera 276 y Almagro - Quito, Ecuador
> Tel. +593 2 290 55 18 ---- Cel. +593 9 946 4046
> ---------  http://www.andinasoft.com  ---------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

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


Mime
View raw message