【问题标题】:404 error after upgrade to Struts 2.3.32升级到 Struts 2.3.32 后出现 404 错误
【发布时间】:2017-03-23 06:44:05
【问题描述】:

我升级了Struts2版本,包括

  1. free-marker-2.3.22.jar
  2. ognl-3.0.19.jar
  3. struts2-core-2.3.32.jar
  4. struts2-json-plugin-2.3.32.jar
  5. struts2-junit-plugin-2.3.32.jar
  6. struts2-spring-plugin-2.3.32.jar
  7. 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”,控制台没有显示任何消息。

我该怎么办?

【问题讨论】:

  • 您的问题文本与标题行有何关系?
  • 对不起,我的错。 T-T

标签: java spring maven jar struts2


【解决方案1】:

属性文件中的键区分大小写。 struts.xml 中使用了相同的密钥。请参阅文档Class PropertyResourceBundle

<constant name="struts.convention.action.mapAllMatches" value="true"/>

【讨论】:

  • @Volley 您应该接受并支持对您有帮助的答案。如果您不知道该怎么做,请参阅stackoverflow.com/tour
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-09-07
  • 2020-01-19
  • 2014-10-06
  • 1970-01-01
相关资源
最近更新 更多