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 if you need to span your transaction across multiple servlet invocations?
What is Generic Servlet and how it is different from Http Servlet?
if u havea .class file ,how can u say whether it is servlet or not ,dont use java decompliler
What is the need of servlet filters?
What do you mean by filter in servlet?
Can you refresh servlet in client and server-side automatically?
How to handle exceptions thrown by application with another servlet?
Which method of the httpservletrequest object is used?
Is tomcat a servlet container?
How can you create a session in servlet?
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?