ServletFileUpload.parseRequest()爲空

項目中上傳時ServletFileUpload.parseRequest()取值爲空原來是struts2的過濾器攔截問題apache

  1. <filter>  
  2.   <filter-name>struts2</filter-name>  
  3.   <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>  
  4.  </filter>  
  5.  <filter-mapping>  
  6.   <filter-name>struts2</filter-name>  
  7.   <url-pattern>/*</url-pattern>  
  8.  </filter-mapping> 

裏面的/*改爲*.action便可app

相關文章
相關標籤/搜索