Java Servlet Programming Question:

Download Job Interview Questions and Answers PDF

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

Java Servlet Programming Interview Question
Java Servlet Programming Interview Question

Answer:

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.

Download Java Servlet Programming Interview Questions And Answers PDF

Previous QuestionNext Question
Given the request path below, which are context path, servlet path and path info?When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?