• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Filter doubts

 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the main purpose of Filter? I can't get it.. Why/where to use filters?
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
read (online) the chapter 9 : Servlet And Jsp Filters of SERVLETS and JAVASERVER PAGES by Marty Hall
 
Dave Wingate
Ranch Hand
Posts: 262
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also be interested in this thread.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Filters are used for any purpose for which you may wish to pre-process or post-process requests.

For example, I extensively use filters for authentication checking.
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Typically fitlers are used for caching purpose, authentication puropose (as Bear already mentioned), compression purpose and etc.
 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why we have to use Filters for authentication? If I am configuring the DD with <login-config>BASIC/DIGEST</login-config>, it will take care of the authentication? Then Why we should use Filters for authentication?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not all authentication requirements can be handled by the simple, built-in schemes.
 
Micheal John
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all of you and especially to Saif uddin, who gievn the wondeful link to Filters by Hall and his explanation is good and thanks once again thanks to (H)all!!

[ January 16, 2007: Message edited by: Micheal John ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic