struts 2アップグレードstruts-23.32とstruts-2.50以上のバージョンは404エラーを報告します。


最近はstruts 2の脆弱性のため、安全ではないバージョンをセキュリティのstruts-23.32またはstruts-2.50以上のバージョンにアップグレードする必要があります。私が遭遇した問題についていくつか注意すべき点があります。

   
   
   
   
  1. 1、/span>
  2. "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
  3. "http://struts.apache.org/dtds/struts-2.3.dtd">

   
   
   
   
  1. 2、
  2. <constant name="struts.enable.DynamicMethodInvocation" value="true"/>
3、 2.5 JDK1.7, web.xml

   
   
   
   
  1. <filter-name>struts2 filter-name>
  2. <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter filter-class>
4、2.5 404 , struts.xml

   
   
   
   
  1. <global-allowed-methods>regex:.* global-allowed-methods>