You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by he...@dnbnor.no on 2005/03/21 11:09:04 UTC

MyFaces and Filters not working ?

Hi

I am starting get to the stage of my migration from Struts to MyFaces
where I was going to add the security stuff. In my struts application I
am using SecurityFilter from S.F, and It works flawlessly. I configured
the MyFaces Blank application first to use the standard "BASIC"
authentication using a JDBCRealm in Tomcat5. That worked ok, popping up
a logon dialog to authenticate. Then I configured it to use
SecurityFilter, and I am seeing somthing strange. The init method of the
filter is being called Ok and it does its stuff. But the onFilter method
is NEVER called. I sa somebody else seing the same behaviour in the
ExtensionFilter, althogh in a different scenario. Is this a known issue
?

Hermod


* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Re: MyFaces and Filters not working ?

Posted by Jonathan Eric Miller <je...@uchicago.edu>.
I don't know if this is what you're seeing, but, if you are using Tomcat 
security, the filters don't get executed until after you have logged in. I'm 
using several filters with MyFaces without problem. The only other thing 
that I can think of is that you don't have the filter URL pattern set 
correctly.

Jon

----- Original Message ----- 
From: <he...@dnbnor.no>
To: <my...@incubator.apache.org>
Sent: Monday, March 21, 2005 4:09 AM
Subject: MyFaces and Filters not working ?


> Hi
>
> I am starting get to the stage of my migration from Struts to MyFaces
> where I was going to add the security stuff. In my struts application I
> am using SecurityFilter from S.F, and It works flawlessly. I configured
> the MyFaces Blank application first to use the standard "BASIC"
> authentication using a JDBCRealm in Tomcat5. That worked ok, popping up
> a logon dialog to authenticate. Then I configured it to use
> SecurityFilter, and I am seeing somthing strange. The init method of the
> filter is being called Ok and it does its stuff. But the onFilter method
> is NEVER called. I sa somebody else seing the same behaviour in the
> ExtensionFilter, althogh in a different scenario. Is this a known issue
> ?
>
> Hermod
>
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> *
>
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that the DnB NOR 
> Group
> cannot accept any payment orders or other legally binding correspondence 
> with
> customers as a part of an email.
>
> This email message has been virus checked by the virus programs used
> in the DnB NOR Group.
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> *
> 


Re: MyFaces and Filters not working ?

Posted by Adrien FOURES <af...@sigems.fr>.
Hermod,

I use MyFaces 1.0.8 with JSF 1.0.1_1, and Tomcat 5.0.28, i have develop 
an filter for the authentification too, and it's working very well

 - build class wich implement javax.servlet.Filter,
 - put all your code in the doFilter function,

 - add in your web.xml
 <filter>
  <filter-name>NameFilter</filter-name>
  <filter-class>package.class</filter-class>
 </filter>

 <filter-mapping>
  <filter-name>NameFilter</filter-name>
  <url-pattern>/page/private/*</url-pattern>
 </filter-mapping>


Adrien


hermod.opstvedt@dnbnor.no wrote:

>Hi
>
>I am starting get to the stage of my migration from Struts to MyFaces
>where I was going to add the security stuff. In my struts application I
>am using SecurityFilter from S.F, and It works flawlessly. I configured
>the MyFaces Blank application first to use the standard "BASIC"
>authentication using a JDBCRealm in Tomcat5. That worked ok, popping up
>a logon dialog to authenticate. Then I configured it to use
>SecurityFilter, and I am seeing somthing strange. The init method of the
>filter is being called Ok and it does its stuff. But the onFilter method
>is NEVER called. I sa somebody else seing the same behaviour in the
>ExtensionFilter, althogh in a different scenario. Is this a known issue
>?
>
>Hermod
>
>
>* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
>This email with attachments is solely for the use of the individual or
>entity to whom it is addressed. Please also be aware that the DnB NOR Group
>cannot accept any payment orders or other legally binding correspondence with
>customers as a part of an email. 
>
>This email message has been virus checked by the virus programs used
>in the DnB NOR Group.
>
>* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
>
>  
>