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

Can we use the constructor, instead of init(), to initialize servlet?

0 Answers  


What do you mean by session tracking and also explain its techniques?

0 Answers  


what is servlet chaining?

0 Answers  


Why the container loads server at the application startup and how?

0 Answers  


How do you configure a centralized error handler in servlets?

0 Answers  






What is meant by Servlet? What are the parameters of service method?

0 Answers  


What are the kinds of http requests?

0 Answers  


Explain the servlet context.

0 Answers  


What are the uses of servlet and what is servlet chaining?

0 Answers  


What is connection pooling?

4 Answers   Wipro,


can i modify the data which are generated by the servlet

4 Answers  


when you comppile the servlet is it neccesary to restaet the tomcat server?

6 Answers   HCL,


Categories