在我的行动中:
.....
String status = "add";
servletRequest.setAttribute("button", status);
....
在我的 JSP 中:
<c:if test='${button == "add"}'>
<c:set var="edittype" value="add" />
</c:if>
<c:if test='${button == "update"}'>
<c:set var="edittype" value="update" />
</c:if>
我努力了:
<html:hidden property ="" value="edittype" />
和
<html:hidden property ="" value="${button}" />
也没有工作。我该怎么做呢?