【发布时间】:2015-01-05 14:57:49
【问题描述】:
我最近将 Spring 框架从 3.1.2 升级到了 4.1.1。还升级到 Tomcat 8 和 Java 8。我也在使用 Tiles 2.2.2。
我的网页使用 Spring 4 加载良好,但当我提交表单时出现问题。 URL 请求更改并省略了 webapp 名称。
例如,当我提交表单时, 预期的 URL 应该是 http://xx.xx.xx.xx/webappname/createuser/submit。
但 URL 更改为 http://xx.xx.xx.xx/createuser/submit。因此,会引发“请求的资源不可用”错误。
我在使用 Spring 3.1.2、Tomcat 7、Java 7 时没有遇到这个问题。
我可以知道我错过了什么吗?
谢谢你, 胡须
编辑:
我的 jsp 视图是这样的
<form:form method="post" action = "/createuser/submit" commandName = "createForm" >
.....
< /form>
【问题讨论】:
-
你可以试试