項目中上傳時ServletFileUpload.parseRequest()取值爲空原來是struts2的過濾器攔截問題apache
- <filter>
- <filter-name>struts2</filter-name>
- <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>struts2</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
裏面的/*改爲*.action便可app