What is Servlet Filter And What does it work?



What is Servlet Filter And What does it work?..

Answer / 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

More Advanced Java Interview Questions

diff vector arraylist

4 Answers   Saka Solutions,


how team leaders assign work for the team member like through papers,word document

1 Answers   TCS,


what's the main difference between unix os and linux os?

2 Answers   TCS,


difference of inheritance and interface

3 Answers  


what is difference between object state and behaviour?

3 Answers  






What is RMI architecture?

11 Answers   Infosys,


What does module-relative mean?

0 Answers  


can any one tell me how to learn good coding techniques

3 Answers  


what we can't do in jdbc but can do hibernate?

3 Answers   Cap Gemini,


Why does most servlets extend HttpServlet?

4 Answers   Accenture, Wipro,


What is serialization and de-serialization ?

5 Answers  


What is the immediate superclass of the applet class?

0 Answers  


Categories