---
title: "  Struts2中的ActionContextCleanUp拦截器 "
author: "小色帝"
date: "2016-07-22T15:47:52Z"
tags: []
categories: ["Web前端"]
slug: "struts2-actioncontextcleanup"
draft: false
lastmod: "2016-07-22T15:47:52Z"
id: 2312940
url: "https://wangdingxin.iteye.com/blog/2312940"
---

<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，否则会发生第一次上传取不到文件的情况。




原帖地址:http://blog.sina.com.cn/s/blog_5bd6b45101012i74.html