How to use URL rewriting in <s:Form action="delete">
in this below code
how to resolve this error
<s:iterator value="masterlist" var="item">
<tr bordercolor="#E6E6E6">
<td><a href="<s:url namespace="" action="uncchequepopulate1">
<s:param name="chequeNumber" value="%{#item.chequeNo}" /></s:url>">
<s:property value="%{#item.doncd}" />
</a>
</td>
<td><s:property value="%{#item.dondesc}" /> </td>
<td><s:property value="%{#item.dondesce}" /></td>
<td><s:property value="%{#item.accno}" /></td>
<center> <td>
<s:form action="delete?doncod=<s:property value="%{#item.doncd}" />" >
<s:submit value="Delete" theme="simple"></s:submit></s:form></td><center>
<center> <td> <s:form action="modify" name="regform" id="formSelectOne" theme="simple">
<s:submit value="MODIFY" theme="simple"></s:submit></s:form></td> </center>
</s:iterator>
how to resolve this error
HTTP Status 500 - /Masterindex.jsp (line: 116, column: 60) Unterminated `<s:form>` tag this error will be display how to resolve
You can build the URL with the
s:url
tag with parameters before you use it with the form tag. Thes:form
tag uses theaction
attribute to map with the action but it also accept URLs if they are properly formatted. That what we will do now.Another approach, which most recommended is to use
hidden
field as request parameter to hold the value submitted with the form.So, these two methods could be used to pass a parameter with the form action.