• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What are filters??

 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do any body of u have idea about the filters??
and what are the conditions when they can be used??
Thanx in advance
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Among the types of functionality available to the developer needing to use filters are the following:
� The accessing of a resource before a request to it is invoked.
� The processing of the request for a resource before it is invoked.
� The modification of request headers and data by wrapping the request in customized versions of the request object.
� The modification of response headers and response data by providing customized versions of the response object.
� The interception of an invocation of a resource after its call.
� Actions on a servlet, on groups of servlets, or static content by zero, one, or more filters in a specifiable order.


Here is sthing that I extract from the Servlet 2.4 Specification... Hope it helps you...
 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will try to out the filters..
can u please quote a real life example..may be that will make my idea a bit clear about filters...
Thanx Once again,,,
 
stable boy
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe you want to log every request before it arrives in your main servlet. This gives you the ability to remove the filter later without touching your base code.
Filtering can be used to manipulate also the headers of your request/response.
You can also use it for decompressing of your response before it is sent to the client.
Recording of sessions that are active on the server.
etc....
http://www.j2eecertificate.com
 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Loggins is a good example ...
Basically i was not able to find the implication between the servlets and the filters... Yes now i think that filters basically can be added any time or removed to provide the common funcionality to all the servlets..
Moreover without touching the base servlet tcode....
m i rite???
Any other examples are Welcome..
Thanx a lot Thomas
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic