升级到 Struts 2.3.32 后出现 404 错误
404 error after upgrade to Struts 2.3.32
我升级了Struts2版本,包括
- free-marker-2.3.22.jar
- ognl-3.0.19.jar
- struts2-core-2.3.32.jar
- struts2-json-plugin-2.3.32.jar
- struts2-junit-plugin-2.3.32.jar
- struts2-spring-plugin-2.3.32.jar
- xwork-core-2.3.32.jar
并将代码添加到 struts.xml
<constant name="struts.enable.DynamicMethodInvocation" value="true"/>
<constant name="struts.convention.action.mapallmatches" value="true"/>
我没有使用 freemarker 但我也将 jar 添加到 "WEB-INF/lib"
pom.xml
也升级了。
tomcat 启动时没有异常。
但是我的项目总是显示“404”,控制台没有任何消息。
我该怎么办?
属性文件中的键区分大小写。 struts.xml
中使用了相同的键。请参阅文档 Class PropertyResourceBundle.
<constant name="struts.convention.action.mapAllMatches" value="true"/>
我升级了Struts2版本,包括
- free-marker-2.3.22.jar
- ognl-3.0.19.jar
- struts2-core-2.3.32.jar
- struts2-json-plugin-2.3.32.jar
- struts2-junit-plugin-2.3.32.jar
- struts2-spring-plugin-2.3.32.jar
- xwork-core-2.3.32.jar
并将代码添加到 struts.xml
<constant name="struts.enable.DynamicMethodInvocation" value="true"/>
<constant name="struts.convention.action.mapallmatches" value="true"/>
我没有使用 freemarker 但我也将 jar 添加到 "WEB-INF/lib"
pom.xml
也升级了。
tomcat 启动时没有异常。
但是我的项目总是显示“404”,控制台没有任何消息。
我该怎么办?
属性文件中的键区分大小写。 struts.xml
中使用了相同的键。请参阅文档 Class PropertyResourceBundle.
<constant name="struts.convention.action.mapAllMatches" value="true"/>