1 R 1 requestDispatcher object is a wrapper around a Web resource that can be used to forward the current request to that resource.

This forwarding is a transfer of control on the server side, and requests from the client are sent to the new page for processing.

With request forwarding, the forwarded resource address is not displayed in the address bar of the client’s browser.

With request forwarding, you can transfer data, status, and other information from the previous page to the forwarded page.

2 The sendRedirect() method actually sends a special response header (Location, status code 302) to the browser,

It commands the browser to connect to the new location.

Therefore, you can see the address change in the browser’s address bar using this method.

Redirects are treated as separate requests, so all request-scoped parameters are invalidated when redirected to the next page. Resources cannot be in the WEB-INF directory when redirected using the sendRedirect() method.