标签:org isp tsp 报错 cut filter 获取 nbsp struts2
过了好久又重新接触Struts2,使用maven直接获取的struts2-core-2.5.1的包,从网上直接copy了一段web.xml中的Filter,结果报错,struts2.3.x 以后用以下配置:
1 <filter> 2 <filter-name>struts2</filter-name> 3 <filter-class> 4 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter 5 </filter-class> 6 </filter> 7 8 <filter-mapping> 9 <filter-name>struts2</filter-name> 10 <url-pattern>/*</url-pattern> 11 </filter-mapping>
后发现随struts 版本升级 Filter 发生了变化,struts2.5.1 以后 用以下配置:
<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
标签:org isp tsp 报错 cut filter 获取 nbsp struts2
原文地址:http://www.cnblogs.com/hupi/p/7103694.html