explain filters in java?

Answers were Sorted based on User's Feedback



explain filters in java?..

Answer / srikanth

filters are used to preprocessing and postprocessing of
tasks like login,authorization,data compression,data
encoding etc

for this u need to override intit(),dofilter(),and destroy()

Is This Answer Correct ?    16 Yes 0 No

explain filters in java?..

Answer / suresh royal

Filter is a special web resource program that is capable of
trapping the request and taking the response of other web
resource programs.

Filter is a interface .

A servlet program which is implemented javax.servlet.Filter
interface is called "Servlet Filter"

Filter having three methods..
==================================
init(FilterConfig fg)
DoFilter(SReq req ,Sres res,FilterChain fc)
destroy()

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More Servlets Interview Questions

What if you need to span your transaction across multiple servlet invocations?

0 Answers  


What is Generic Servlet and how it is different from Http Servlet?

5 Answers   Wipro,


if u havea .class file ,how can u say whether it is servlet or not ,dont use java decompliler

4 Answers   Polaris,


What is the need of servlet filters?

0 Answers  


What do you mean by filter in servlet?

0 Answers  






Can you refresh servlet in client and server-side automatically?

0 Answers  


How to handle exceptions thrown by application with another servlet?

0 Answers  


Which method of the httpservletrequest object is used?

0 Answers  


Is tomcat a servlet container?

0 Answers  


How can you create a session in servlet?

0 Answers  


What is the use of RequestDispatcher in servlet?

18 Answers   Accenture, CTS, TCS,


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

0 Answers  


Categories