What is Servlet Filter And What does it work?
Answer Posted / surajkumar.java
Filters are powerful tools of Servlet platform. These are
just like a servlet which plugs into the request handling
process and executes in addition to the normal page
processing. Filters manipulate both request and response in
web application. Filters can be applied to any resources
like HTML, graphics, a JSP page, servlet etc, served by a
servlet engine. These are commonly used for authentication,
data format conversion and page redirect to other page and
catching etc.
A java class which implements javax.servlet.Filter is
configured as filter in web.xml file. For each request in
web application, the servlet container decides which filters
to apply, and adds those filters to a chain in the same
order they appear in web.xml. As a filter is just like a
servlet, it has its life cycle (init(), doFilter() and
destroy() methods).
| Is This Answer Correct ? | 22 Yes | 3 No |
Post New Answer View All Answers
How to deploy Jar, War files in J2EE?
What are the difference between RMI and CORBA?
How is a java object message delivered to a non-java client?
Name three component subclasses that support painting?
Are enterprise beans allowed to use thread.sleep()?
What is Remote Server?
Is infobus easy to use?
What is the purpose of the wait() method?
Write a program to show synchronization?
What is an abstract method?
How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!
What is the purpose of the finally clause of a try-catch-finally statement?
What is RMI and what are the services in RMI?
What state does a thread enter when it terminates its processing?
What is TL and its use?