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 is filter? Can filter be used as request or response?
Explain get and post.
Is JSP Thread Safe ???? How To make JSP thrad safe ?????
Tell the new features added in servletrequest interface i.e. Servlet 2.4
Explain the methods in Generic and HTTP Servlets?
What is use of parseQueryString?
What is the difference between get and post methods?
What is the difference between the http servlet and generic servlet?
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()?
How many objects of a servlet is created?
Name the servers that can be used to develope and deploy Servlets?
Can you use javascript in servlets?