When designing a servlet that handles sensitive data, which header should be set to secure the response?
- Access-Control-Allow-Origin, setHeader()
- Strict-Transport-Security, setHeader()
- X-Content-Type-Options, setHeader()
- X-Frame-Options, setHeader()
To secure the response when handling sensitive data, the Strict-Transport-Security header should be set using the setHeader() method in the HttpServletResponse.
Loading...
Related Quiz
- Why is it important to close resources like database connections in servlets?
- If a filter needs to perform different actions based on the type of HTTP request, which method or object should it use to determine this?
- What is the significance of the web.xml security constraints in servlet security?
- In database optimization, _________ refers to the process of storing frequently accessed data in a temporary storage area.
- How can you handle a situation where a database connection is lost during a transaction?