Request Forwarding Use method
Httpservletrequest.getrequestdispatcher ("login.jsp"). Forward (HttpServletRequest, servletresponse);
This request process is done exactly once by the requests object.
We can use filter to intercept the user's request, and then use this request to access other pages, when the server returns information to the browser when the request and response end.
Procedure similar to request request request response
Three request is the same object
Request Redirection Use Method
Httpservletresponse.sendredirect ("http://192.168.101.243:8881/simpleshop_mvc/jsp/login.jsp");
Request redirection is the interception of this request by the browser, which is then redirected again by browsing to initiate a request to access the redirected data.
The process is similar to request response request response
Two request is two objects
Javaweb Request forwarding and request redirect understanding