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 are different ways for servlet authentication?

0 Answers  


What is string tokenizer?

0 Answers  


Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?

0 Answers  


How do u authorize and authenticate without <auth> of web.xml

1 Answers   Bosch,


Difference between forward() method and sendredirect() method ?

0 Answers  






What are the differences between the servletconfig interface and the servletcontext interface?

0 Answers  


how the HTML data stored in web server?

0 Answers   TCS,


What are the two important api's in for servlets?

0 Answers  


What are different types of SessionTracking?

2 Answers  


How many Cookies can a host support?

2 Answers  


What is Request Dispatcher?

1 Answers  


What exception should be thrown when servlet is not properly initialized?

0 Answers  


Categories