1.参考链接:
Just drop the jar into WEB-INF/libs folder and add the bellow definition into your struts.xml:
if you are running the Apache Struts 2.3.8 - 2.3.31
<bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
class="org.apache.struts.extras.SecureJakartaMultipartParser"
name="secure-jakarta"
scope="default"/>
<!-- when running Struts 2.3.8 use this constant name -->
<constant name="struts.multipart.handler" value="secure-jakarta"/>
<!-- when running Struts 2.3.9 - 2.3.31 use this constant name -->
<constant name="struts.multipart.parser" value="secure-jakarta"/>
if you are running the Apache Struts 2.5 - 2.5.5
<bean type="org.apache.struts2.dispatcher.multipart.MultiPartRequest"
class="org.apache.struts.extras.SecureJakartaMultipartParser"
name="secure-jakarta"
scope="prototype"/>
<constant name="struts.multipart.parser" value="secure-jakarta"/>
2. 需要的jar包。
struts2-secure-jakarta-multipart-parser-plugin-1.1.jar
链接: https://pan.baidu.com/s/1ZaxU9I-kE4QWQno5pBYeRA 提取码: cnt2