Servlets 提交表单并从servlet中的dropdownlist获取所选数据

Servlets 提交表单并从servlet中的dropdownlist获取所选数据,servlets,Servlets,我有一个doPost方法 protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { LOGGER.debug("Form Submitted with username: " + request.getAttribute("username")); } 还有我的JSP <select name="use

我有一个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>

没有任何记录,这表明表单没有提交

你的onchange上写的是this.from.submit而不是this.form.submit

如果你接受了一些答案,你会得到更多人的帮助。