Title: SV: Problem with Filters and RequestDispatcher in Orion 1.4.5
My filter and it's mapping is shown below. Tomcat does not invoke the filter when the RequestDispatcher is used.
Since the RequestDispatcher is internal it would seem that it should not invoke the filters. This is however not specified in the Servlet2.3 spec.
 
As you can see in this configuration the LoginPage is in the protected directory. If I move it out everything works properly unless I try to include a file from the protected directory. Then the filter is invoked again.
I don't think this is the way it should work.
 
 
Anders
 
    <filter>
        <filter-name>HtmlLoginFilter</filter-name>
        <filter-class>com.netpuls.servlet.LoginFilter</filter-class>
     <init-param>
         <param-name>loginPage</param-name>
         <param-value>/html/login.jsp</param-value>
     </init-param>
     <init-param>
         <param-name>failedLoginPage</param-name>
         <param-value>/html/failedLogin.jsp</param-value>
     </init-param>
     <init-param>
         <param-name>loginHandler</param-name>
         <param-value>com.netpuls.np.WebUser</param-value>
     </init-param>
    </filter>
    <filter-mapping>
        <filter-name>HtmlLoginFilter</filter-name>
        <url-pattern>/html/*</url-pattern>
    </filter-mapping>
-----Ursprungligt meddelande-----
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]För Magnus Rydin
Skickat: den 23 mars 2001 09:46
Till: Orion-Interest
Ämne: SV: Problem with Filters and RequestDispatcher in Orion 1.4.5

How does your filter mapping look?
Does Tomcat ivoke filters on forward/include?
WR

> -----Ursprungligt meddelande-----
> Från: Anders Janmyr [mailto:[EMAIL PROTECTED]]
> Skickat: den 23 mars 2001 00:25
> Till: Orion-Interest
> Ämne: Problem with Filters and RequestDispatcher in Orion 1.4.5
>
>
> Hello,
>
> I am trying to use filters for authenticating users. My filter uses
> RequestDispatcher.forward to show a login page when the user needs to
> authenticate himself.
>
> This results in the filter beeing invoked again. It seems that the
> RequestDispatcher in orion (both forward and include) invokes
> the filter
> again. Tomcat does not do this. What is the correct behavior?
> The spec does
> not say how it should be working.
>
> Any help would be appreciated.
>
> Anders
>
>

Reply via email to