struts 2アップグレードstruts-23.32とstruts-2.50以上のバージョンは404エラーを報告します。
最近はstruts 2の脆弱性のため、安全ではないバージョンをセキュリティのstruts-23.32またはstruts-2.50以上のバージョンにアップグレードする必要があります。私が遭遇した問題についていくつか注意すべき点があります。
-
1、/span>
-
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
-
"http://struts.apache.org/dtds/struts-2.3.dtd">
-
2、
-
<constant name="struts.enable.DynamicMethodInvocation" value="true"/>
3、 2.5 JDK1.7, web.xml
-
-
<filter-name>struts2
filter-name>
-
<filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
filter-class>
4、2.5 404 , struts.xml
-
-
<global-allowed-methods>regex:.*
global-allowed-methods>
・