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 jboss?
Are we allowed to change the transaction isolation property in middle of a transaction?
What is an abstract method?
Brief description about local interfaces?
How to deploy Jar, War files in J2EE?
Which component handles cluster communication in jboss?
What is TL and its use?
What is prototype?
how i secure my site with the https protocol.what are the steps?
what are the activation groupworks?
Explain the advantages and disadvantages of detached objects.
what is the use of State Factories?
difference between ejb,struts,hibernate,spring and jsp
What are JTA/JTS and how they used by client?
What are the different types of exception?