This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What are filters??

 
Andy Smith
Ranch Hand
Posts: 239
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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,,,
 
Thomas De Vos
stable boy
Ranch Hand
Posts: 425
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic