我尝试通过链接发送id-property的值为
<html:link action="action?method=view&newsID='<bean:write name="news" property="id"/>'">View</html:link>
或
<input type="hidden" name="newsID" value='<bean:write name="news" property="id"/>'/>
<html:link
action="action?method=view&newsID=${newsID}">
View
</html:link>
但没有任何效果。你能帮助我吗?
答案 0 :(得分:4)
帮自己一个忙,并使用JSTL:
<c:url var="theUrl" value="/action.do">
<c:param name="method" value="view"/>
<c:param name="newsID" value="${news.id}"/>
</c:url>
<a href="${fn:escapeXml(theUrl)}">View</a>