过滤器配置web.xml
使用控制层action时,需要在web.xml中配置过滤器,配置如下
<filter>
<filter-name>/filter</filter-name>
<filter-class>org.myhibernate.mvc.filter.DispatchFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>/filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>