当我提交 JSP 表单时,我在 IE 中收到 405 - Request method 'POST' not support
错误消息。
同一应用程序在 Google Chrome 和 Mozilla Firefox 中运行良好,但在 IE 6,7 和 8 中抛出错误消息
我的 JSP:
<form:form name="create" action="submit.view" method="POST" commandName="xxx">
....
</form:form>
Controller :
@Controller
public class TicketController {
@RequestMapping(value = "/submit.view", method = RequestMethod.POST)
public ModelAndView submit(HttpServletRequest request,
HttpServletResponse response,
@ModelAttribute("xxx") Form TicketForm, BindingResult result)
throws Exception {
...
...
}
}
谁能解释一下为什么我只在 IE 中收到这些错误消息?
最佳答案
试试这个:
@RequestMapping(value = "*/submit.view", method = RequestMethod.POST)
也许 IE 会更改表单操作 url
关于java - HTTP 状态 405 - 不支持请求方法 'POST'(仅限 IE),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8212178/