问题描述
upload.parseRequest(request);用到strut2在网上找了,说是struts2把request给拦截了,所以就upload.parseRequest(request)为null.网上大多方法是将web.xml配置修改如下:(而我的问题是,修改后,web就不能运行了,)<filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class></filter><filter-mapping><filter-name>struts2</filter-name><url-pattern>/*</url-pattern></filter-mapping>
<filter-mapping><filter-name>struts2</filter-name><url-pattern>*.action</url-pattern></filter-mapping>
如果改为<filter-mapping><filter-name>struts2</filter-name><url-pattern>/*.action</url-pattern></filter-mapping>
也无法访问HTTPStatus404-typeStatusreportmessagedescriptionTherequestedresource()isnotavailable.
时间: 2024-11-08 21:56:46