Jsp 如何使用url重写概念?
如何在下面的代码中使用Jsp 如何使用url重写概念?,jsp,struts2,Jsp,Struts2,如何在下面的代码中使用中的URL重写 如何解决此错误 <s:iterator value="masterlist" var="item"> <tr bordercolor="#E6E6E6"> <td><a href="<s:url namespace="" action="uncchequepopulate1"> <s:param name="chequeNumber" value="%{#item.chequeN
中的URL重写
如何解决此错误
<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>
HTTP Status 500 - /Masterindex.jsp (line: 116, column: 60) Unterminated `<s:form>` tag this error will be display how to resolve
如何解决此错误
<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>
HTTP Status 500 - /Masterindex.jsp (line: 116, column: 60) Unterminated `<s:form>` tag this error will be display how to resolve
HTTP Status 500-/Masterindex.jsp(第116行,第60列)Unterminated``标记此错误将显示如何解决
您可以先使用带有参数的s:URL
标记构建URL,然后再将其与表单标记一起使用。s:form
标记使用action
属性与操作进行映射,但如果URL格式正确,它也接受URL。这就是我们现在要做的
<s:url var="deleteUrl" action="delete" includeContext="false"><s:param name="doncod" value="%{#item.doncd}"/></s:url>
<s:form action="%{#deleteUrl.substring(1)}" method="POST">
因此,这两种方法可用于通过表单操作传递参数。不要像在
标记操作
属性中那样嵌套标记。如何为doncd重写url请回复