代码没问提,但是点击form表单的提交按钮,显示404
百度得结果

解决方法:

<form action="/logon">
改为 <form action="${pageContext.request.contextPath}/logon">
即可! 亲测有效。

原因:下图框柱的地方加了项目名称,若只是“/”则不需要**${pageContext.request.contextPath}**这部分代码。!!!!!!
【SpringMVC】 form提交到controller 报404 解决方法

【SpringMVC】 form提交到controller 报404 解决方法

相关文章:

  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2021-09-22
  • 2021-09-29
猜你喜欢
  • 2022-12-23
  • 2021-04-18
  • 2022-12-23
  • 2021-08-07
  • 2021-08-07
相关资源
相似解决方案