What is filter? Can filter be used as request or response?



What is filter? Can filter be used as request or response?..

Answer / mahesh

A filter is a reusable piece of code that can transform the
content of HTTP requests,responses, and header information.
Filters do not generally create a response or respond to a
request as servlets do, rather they modify or adapt the
requests for a resource, and modify or adapt responses from
a resource.

Is This Answer Correct ?    10 Yes 1 No

Post New Answer

More Servlets Interview Questions

Explain the difference between jsp and servlet?

0 Answers  


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

0 Answers   CTS,


What are the common methods that are included in the http servlet class?

0 Answers  


What is the effective way to make sure all the servlets are accessible only when user has a valid session?

0 Answers  


What is Single Threaded Model in Servlets? Explain this with an example?

10 Answers   Wipro,






What are the important functions of filters?

0 Answers  


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

0 Answers  


How do you create a cookie using servlet?

0 Answers  


What is the difference between context parameter and context attribute?

0 Answers  


Can we override the ActionServlet?

3 Answers   ArisGlobal, HCL, PPF,


What methods do you use in servlet - applet communication?

0 Answers  


Hi guys.. Well can u tell me that why there is need of "init()" , i mean why can not we initialize the servlet object with the help of constructors? Thank you.

7 Answers  


Categories