What method is commonly used to send a redirect response to the client in servlets?
- forwardResponse()
- redirectResponse()
- sendForward()
- sendRedirect()
The sendRedirect() method is commonly used in servlets to send a redirect response to the client, specifying the new URL to which the client should be redirected.
Loading...
Related Quiz
- How can you securely send sensitive data from a client to a server in a web application?
- In the context of servlets, what is a key difference between HTTP and WebSocket protocols?
- What is the first method called when a filter is instantiated by the servlet container?
- If a servlet needs to log application-wide events, which object would be the best choice for retrieving the log file’s path?
- The response header 'Content-Disposition' with value 'attachment; filename="file.txt"' is set using the __________ method.