If an HTTP servlet receives a request with an invalid session token, what should it do next?
- Generate a new session token and proceed
- Ignore the request
- Redirect to the login page
- Send an HTTP 401 Unauthorized response
In the case of an invalid session token, it's a security best practice to send an HTTP 401 Unauthorized response to prompt reauthentication.
Loading...
Related Quiz
- The __________ method of HttpServletResponse causes the browser to request a new URL.
- The method __________ is used when the servlet needs to redirect the client to a different domain.
- The use of ___________ in error messages helps in identifying the exact source of an error in servlets.
- In Java, the __________ collector is used for young generation garbage collection.
- How is an asynchronous task started in a servlet?