File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes filter mechanism in Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "filter mechanism in Servlets " Watch "filter mechanism in Servlets " New topic
Author

filter mechanism in Servlets

G Subrahmanyam
Greenhorn

Joined: Dec 16, 2000
Posts: 11
How filter mechanism works in SERVLETS 2.3. Pl. give with an eg.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html


Groovy
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

Nice link
Now I am still puzzled over two things:
1) What is the order that multiple filters mapped to same resource are chained ie. which one gets in first?
2) Can filter disable itself?
G Subrahmanyam
Greenhorn

Joined: Dec 16, 2000
Posts: 11
The order of execution is determined by the ordering in the deployment descriptor.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

1.The order of the filters in the chain is the same as the order that filter mappings appear in the web application deployment descriptor.
2. I did not get ur q.

Originally posted by Antti Barck:

Nice link
Now I am still puzzled over two things:
1) What is the order that multiple filters mapped to same resource are chained ie. which one gets in first?
2) Can filter disable itself?
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Originally posted by subrahmanyam gampa:
The order of execution is determined by the ordering in the deployment descriptor.

Okie, but which way? I did some experiencing and found out that first gets last in chain?
Well, actually this is no more relevant issue for me since I figured out that filters can be configured in a manner that makes no difference with the order.
Thanks anyways, both of you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: filter mechanism in Servlets
 
Similar Threads
Filter configuration?
questions about SCEA part II
Who is First Filter or Servlet
ServletContextListener Question
HFS - page 703 Q 5