DEVFYI - Developer Resource - FYI

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

Servlet Interview Questions and Answers


(Continued from previous question...)

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

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.

(Continued on next question...)

Other Interview Questions