It's not necessary to have two forms on the page to submit different actions (methods).
Since the beginning, Struts has a technique to dispatch submit buttons to different actions. In the latest version it's performed via the submit
tag, that is used to build the action URL from the attributes such as action
or method
.
As you are using a simple
theme on the form
tag, it's inherited to all input fields. It's not necessary to apply the same theme individually.
If you are using a table
HTML tag to design your form elements it's substantial to put these buttons inside the same record tr
tag having white-space:nowrap;
CSS style. For example
<s:form name="regform" id="regform" theme="simple">
<table style="width:100%;" cellspacing="0" cellpadding="0" border="0">
<tr style="white-space:nowrap;">
<td style="width:50%;" valign="top" align="right" >
<s:submit action="download2" value="View coc2"/>
</td>
<td style="width:50%;" valign="top" align="right" >
<s:submit action="download1" value="View coc1"/>
</td>
</tr>
<table>
</s:form>
To have the action
attribute being worked see this answer to learn how to enable an action prefix in struts.xml
to be able to use action
attribute of the s:submit
tag.