- All Implemented Interfaces:
- javax.servlet.Filter, org.apache.struts2.StrutsStatics
public class StrutsPrepareFilter
extends org.apache.struts2.dispatcher.filter.StrutsPrepareFilter
Among other things, this org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter wraps the original request and consumes the input stream.
This is not desirable in all cases - servlets behind this URL pattern have to handle that (_especially_ if they handle file uploads).
For example, UPM cannot.
Setting that filter too narrowly will make stale ActionContexts visible in subsequent requests. (Action contexts can get created any time)
This happens when request processing that does not include cleanup filter in its stack manipulates the ActionContext.
This filter fixes this by delegating filtering only to specific URLs, but cleaning all of them.