0

我在调用 formfilter 中的 doFilter 时遇到了这个问题。我期待这会调用下一个过滤器,即。LoginFilter,但它既不返回异常也不调用下一个过滤器类。

*Web.xml***

<filter>
    <filter-name>LoginFilter</filter-name>
    <display-name>LoginFilter</display-name>
    <description></description>
    <filter-class>com.struts.LoginFilter</filter-class>
</filter>

<filter>
    <filter-name>FormFilter</filter-name>
    <display-name>FormFilter</display-name>
    <description></description>
    <filter-class>com.struts.FormFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>LoginFilter</filter-name>
    <servlet-name>action</servlet-name>
</filter-mapping>

<filter-mapping>
    <filter-name>FormFilter</filter-name>
    <url-pattern>/secured/j_security_check</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>FormFilter</filter-name>
    <url-pattern>secured/j_security_check</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>FormFilter</filter-name>
    <url-pattern>/j_security_check</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>FormFilter</filter-name>
    <url-pattern>j_security_check</url-pattern>
</filter-mapping>
<filter-mapping>
    <filter-name>LoginFilter</filter-name>
    <url-pattern>/mainmenu.do</url-pattern>
</filter-mapping>

一旦 j_security_check 完成,控件将调用 FormFilter 调用,之后它应该调用 LoginFilter,它应该被重定向到主菜单。但它没有发生。任何人都可以请指导我。谢谢。

4

0 回答 0