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

What are local interfaces? Describe.

1235


What is the difference between RMI registry and OS Agent?

1149


For which statements does it make sense to use a label?

1084


What are JTA/JTS and how they used by client?

2224


What is the infobus?

1093


What are the sequence of steps to write pub or sub model kind of application?

2519


what is a portable component?

2017


What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

1062


Are we allowed to change the transaction isolation property in middle of a transaction?

1032


What is the difference between the ‘font’ and ‘fontmetrics’ class?

1161


What is abstract schema?

1031


When a thread blocks on i/o, what state does it enter?

1097


Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

1055


Do you think that java should have had pointers?

1064


What is the purpose of the wait() method?

1205