If a filter needs to modify the response header of all responses, which method should be primarily used?
- doFilter()
- doResponse()
- init()
- modifyHeader()
To modify the response header of all responses, the filter should primarily use the doFilter() method, where manipulation of both request and response is possible.
Loading...
Related Quiz
- The isolation level that allows neither dirty reads nor non-repeatable reads is called _________.
- How does the WebSocket protocol handle message framing compared to HTTP?
- In distributed systems, what is a cache stampede and how is it typically mitigated?
- How can an HTTP servlet differentiate between GET and POST requests?
- The scope of ServletContext is: