Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Explain Life cycle of Servlet Filter.

Answer Posted / sunita

filters life cycle:
The life cycle of a filter is managed by a container. Every
filter must implement the Filter interface. The life cycle
of a filter consists of implementing the following methods:

1. init(): This method is called only once after
instantiation to perform any initialization task.

2. doFilter(): This method is called after the init()
method. It takes three arguments, namely a ServletRequest, a
ServletResponse, and a FilterChain. It is called each time a
filter needs to perform any function. This method performs
the actual work of a filter, either modifying the request or
the response.

3. destroy(): This method is used to perform any cleanup
operation before the container removes a filter instance.

Is This Answer Correct ?    36 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are enterprise beans allowed to use thread.sleep()?

1101


Difference between hashmap and hashtable?

1087


How is a java object message delivered to a non-java client?

995


What is the purpose of the wait() method?

1102


Can I have an action without a form?

1048


What is the purpose of the finally clause of a try-catch-finally statement?

981


Name the eight primitive java types.

1058


How to determine SGA site?

2474


Explain RMI Architecture?

1033


what are RemoteObjects?

2680


What are the different approaches to represent an inheritance hierarchy?

1018


whats is statement and procedure

2133


How substring() method of string class create memory leaks?

984


What must a class do to implement an interface?

1092


What are the different class loaders used by jvm?

1046