This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am not getting time to scan Books, as I am a working professional. So i am searching for the resource which provide me the quick way to grasp this topics..???
Atleast you can have *some* time to search in Google (as an alternative), which can throw umpteen results
I second Joe Harry. HFSJ is an excellent book and I bet no one can go without understanding after reading the book.
As you are in hurry, I give few info on the topics you asked for.
1. Filters -- are components that are used before and after processing the request. That is they are acting as a layer intruding the processing of any request. So if you want to do any actions before and/or after processing your request you can use a filter. Sometimes you may need to do some additional checking or setting (like users currency preference or regional settings etc.,) that can be set in the filter before the request is actually handed over to the Servlet. Likewise, once the servlet had processed the request, filters can do some additional activities on the response like zipping the output content by viewing the content type (if he preferred a compressed version if any).
2. Listeners -- are components who can be activated based upon an event. Like whenever an event happens, the listeners would be invoked by the container. For which you have to register the listener with the container against a particular servlet (or set of servlets). The event may be when an object is added/removed to the context, a servlet is created/destroyed, session creation/destruction etc., A good example is like a Form submit button. Only when you click on the submit button the data in the form is sent to the server, until then all are keeping quiet Likewise, listeners act until they are invoked by the container for a specific event!