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
What is the relationship between local interfaces and container-managed relationships?
what are getters and setters in Java with examples?
Can I have an action without a form?
Will the general public have access to the infobus apis?
What is abstract schema?
How can I scroll through list of pages like the search results in google?
What are various types of class loaders used by jvm?
Explain the different types of memory used by jvm?
What is message driven beam?
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?
What is the purpose of the wait() method?
If we opened Windows Internet Explorer 4 times, does it starts 4 processes or 4 threads?
What is a policy?
what are the activation groupworks?
Why do threads block on i/o?