Explain Life cycle of Servlet Filter.

Answer Posted / surajkumar.java

A java class which implements javax.servlet.Filter is
configured as filter in web.xml file.
The web container calls the init method to initialize filter
by passing javax.servlet.FilterConfig object to retrieve the
filter’s init parameters.
The doFilter method of Filter class performs the actual
processing like authentication, data format conversion and
page redirect to other page and catching etc. The doFilter
method passes the request and response object of the current
request and the filter chain object to invoke next filter in
the chain.
Web container calls the destroy() method to take the filter
out of service.

Is This Answer Correct ?    29 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the relationship between local interfaces and container-managed relationships?

592


what are getters and setters in Java with examples?

1284


Can I have an action without a form?

593


Will the general public have access to the infobus apis?

528


What is abstract schema?

553






How can I scroll through list of pages like the search results in google?

567


What are various types of class loaders used by jvm?

495


Explain the different types of memory used by jvm?

612


What is message driven beam?

581


we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?

1922


What is the purpose of the wait() method?

619


If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?

1736


What is a policy?

1767


what are the activation groupworks?

1675


Why do threads block on i/o?

678