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

When a thread blocks on i/o?

0 Answers  


Explain the steps in details to load the server object dynamically?

0 Answers  


Why are my checkboxes not being set from on to off?

0 Answers  


Can I run seam with jdk 1.4 and earlier?

0 Answers  


Can constructors be synchronized in java?

0 Answers  






Are there books about seam?

0 Answers  


What is a class loader?

1 Answers  


What is a compilation unit?

1 Answers  


What are the call back methods in entity bean?

0 Answers  


Explain the life cycle of servlet?

3 Answers   Cognizant, HCL,


Difference between new operator and class.forname().newinstance()?

0 Answers  


whats is mean by tiles in struts

2 Answers   SolutionNET,


Categories