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 class is the top of the awt event hierarchy?
Define the remote object implementation?
Explain ioc concept?
Why are my checkboxes not being set from on to off?
What is table mutation and how do you avoid it?
Which javutil classes and interfaces support event handling?
What is difference between object state and behavior?
What’s jboss cache in short?
What is the difference between the ‘font’ and ‘fontmetrics’ class?
what are getters and setters in Java with examples?
Name three component subclasses that support painting?
What modifiers may be used with an interface declaration?
how i secure my site with the https protocol.what are the steps?
What is a policy?
what is meant by JRMP?