What is the primary purpose of using filters in web applications?
- To handle HTTP requests and responses
- To manage session information
- To perform tasks before or after the request is handled by a servlet
- To store data in the client's browser
The primary purpose of using filters in web applications is to perform tasks before or after the request is handled by a servlet, allowing for common processing tasks to be centralized.
Loading...
Related Quiz
- Which of the following is true about ServletConfig?
- How can a servlet differentiate between client errors (like 404) and server errors (like 500)?
- How do you set a response header to indicate the content should be downloaded as a file?
- How do filters interact with different types of servlets and JSP pages?
- What is the key difference between Stored XSS and Reflected XSS attacks?