我有一个doPost()方法
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
LOGGER.debug("Form Submitted with username: " + request.getAttribute("username"));
}
和我的JSP
<select name="username" onchange="this.from.submit();">
<c:forEach var="ovr" items='${overrides}'>
<option value="${ovr.overrideId}">${ovr.userId}</option>
</c:forEach>
</select>
没有任何记录,这表明表单未提交......
答案 0 :(得分:0)
您的onchange代表this.from.submit()
而非this.form.submit()