Hi

I seem to remember that (look in an earlier thread) there is a problem
with that. Are you calling a faces page within that pattern?

One soulution is to use the top-levek aproach and then check the
requestpath in your filter (I use SecurityFilter for this).

Hermod

-----Original Message-----
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 04, 2005 1:59 PM
To: MyFaces Discussion
Subject: Re: Servlet Filter?


Yes, I discovered that there seems to be something wrong with my
pattern...
If I use /* as the pattern, it works...
But if I use /protected/* then the filter is not called.. (I.e. I want
to protect
every file and subfolders inside a folder called protected, how should
my pattern
look like?


BTJ

[EMAIL PROTECTED] wrote:
> Hi
> 
> I am using filters (for taking care of Hibernate sessions) and it
works
> like a charm. However I did mess up initially because I forgot to add
> the correct mapping, which then resultet in the same behaviour.
> 
> Make sure you have somthing like this in your web.xml file:
> 
>       <filter-mapping>
>               <filter-name><<your_filtername>></filter-name>
>               <url-pattern>/*</url-pattern>
>       </filter-mapping>
> 
> Hermod
> 
> -----Original Message-----
> From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 04, 2005 1:43 PM
> To: myfaces-user@incubator.apache.org
> Subject: Servlet Filter?
> 
> 
> I have a struts application where I am using Filter and Tomcat and
this
> works as it
> should... But trying to do the same thing with a JSF application
doesn't
> work? Are
> there something I am missing? The init() method is called, but
doFilter
> is never
> called, why?
> 
> 
> Regards,
> 
> BTJ
> 

-- 
------------------------------------------------------------------------
-----------------------
Bjørn T Johansen (BSc,MNIF)
Executive Manager                               
[EMAIL PROTECTED]                       Havleik Consulting
Phone : +47 21 69 15 20         Bjørnebærstien 57
Fax : +47 41 13 09 15           N-1348 Rykkinn
Cellular : +47 926 93 298       http://www.havleik.no
------------------------------------------------------------------------
-----------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange
Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
------------------------------------------------------------------------
-----------------------


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

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.

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

Reply via email to