explain filters in java?
Answers were Sorted based on User's Feedback
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 |
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 |
What are the ways to handle multi-threading in servlets?
How threads are implemented in servlets?
What is the purpose of requestdispatcher interface?
What is the major difference between servlet and applet?
How can we include static files in the jsp page?
How can we upload the file to the server using servlet?
How can we refresh automatically when new data has entered the database?
What is the difference between jsp and servlet life cycle?
Hi Friends, Can we make any method thread safe withour synchronized keyword?
when the webcontainer creates ServeletConfig,ServletContext objects? befoure creating the Servlet object or not?
What is ServletConfig object?
What is servlet and how it works?