我的页面上有这样的表格
<form action="ToolbarAction.do" method="POST">
<div id="toolbar"
class="ui-widget-header ui-corner-all ui-widget-content">
<input style="font-family: times new roman;" type="button" id="item0"
value="<fmt:message key='main'/>" /> <input
style="font-family: times new roman;" type="button" id="item1"
value="<fmt:message key='prices'/>" />
<c:choose>
<c:when test="${enterAttr == false || enterAttr == null }">
<input style="font-family: times new roman;" type="submit"
id="item2" value="<fmt:message key='book'/>" />
</c:when>
<c:when test="${enterAttr == true }">
<input style="font-family: times new roman;" type="submit"
id="item2" value="<fmt:message key='check'/>" />
</c:when>
</c:choose>
<input style="font-family: times new roman;" type="submit" id="item3"
value="<fmt:message key='contacts'/>" /> <input
style="font-family: times new roman;" type="submit" id="item4"
value="<fmt:message key='service'/>" />
</div>
</form>
如何检查按下了哪个按钮并导致了 ToolbarAction?exec
ToolbarAction 类中的Here方法。我应该从 HttpServletRequest 获取一些参数吗?
public String exec(HttpServletRequest req, HttpServletResponse resp) {
// TODO Auto-generated method stub
return null;
}