What is the difference in the URL seen by the client when using forward() vs sendRedirect() in servlets?
- The client sees the new URL in both cases
- The client sees the new URL with forward() and the original URL with sendRedirect()
- The client sees the original URL in both cases
- The client sees the original URL with forward() and the new URL with sendRedirect()
The difference lies in what the client sees: with forward(), the client sees the original URL, while with sendRedirect(), the client sees the new URL.
Loading...
Related Quiz
- How does the load-on-startup element in web.xml affect a servlet's lifecycle?
- Describe the role of Subresource Integrity (SRI) in preventing XSS attacks.
- A filter can alter the header information of a request or response by modifying the __________.
- What is two-phase commit protocol in the context of transaction management?
- In a highly concurrent web application, how would you design a servlet to handle database connections securely and efficiently?