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

What method is invoked to cause an object to begin executing as a separate thread?

0 Answers  


Is “abc” a primitive value?

0 Answers  


How do you maintain a stateful session object across the session

2 Answers   HCL,


What are the different algorithms used for clustering?

0 Answers  


Dear freinds... I want to know how to write self mapping for a table using hibernate?

1 Answers   Cap Gemini,






1) Scenario: I developed my application on local system and everything is perfect and tested. Now on UAT this application is deployed on clustered server environment. They are logical or physically clustered. But application is not working over there.  What is the issue with application?  What are the first things which come in your mind?

1 Answers   L&T,


how do you Handle Front End Application data against DB with example?

0 Answers   Campus Interaction, HCL,


Why JDBC has introduced

4 Answers  


What is the difference between RMI registry and OS Agent?

0 Answers  


Name the method to find, if a thread is active or not?

2 Answers  


What is the purpose of the notify() method?

0 Answers  


What is the O/P of the below Code Snippet ? And how does it imply the concept of call-by-value/call-by-reference. (Note : Pls ignore syntx errors) public class One { sop ("Into One--"); } public class Two extends One{ sop ("Into Two--"); } public class Home { One a; Two t; public static void main(argv[]) { sop ("In Home--"); sop(One.a); sop(Two.a); sop(One.t); sop(Two.t); } }

2 Answers   Wipro,


Categories