Struts2中的ActionContextCleanUp攔截器
<filter><filter-name>struts-cleanup</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ActionContextCleanUp
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts-cleanup</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
該filter清除緩存。在做上傳文件時,要在web.xml中增加ActionContextCleanUp這個filter,否則會發生第一次上傳取不到文件的情況。
原帖地址:https://blog.sina.com.cn/s/blog_5bd6b45101012i74.html
最後更新:2017-04-03 20:19:53