Let's first look at the HTTP standard request and response. all the request environments are in the standard input BUFFER, and the response is of course in the standard output BUFFER. this is the standard that any language follows. so how does the SESSION work during JSP implementation? In the first response, an ID and a special status flag are sent by the program. this ID must be returned when the browser sends the request again for identification. first, let's look at the HTTP standard request and response. all the request environments are in the standard input BUFFER, and the response is of course in the standard output BUFFER. this is the standard that any language follows.
So how does the SESSION work during JSP implementation? In the first response, an ID and a special status flag are sent by the program. this ID must be returned when the browser sends the request again for identification. that is to say, if the SESSION needs to work, it will have an ID stored in the standard input.
However, the sendRedirect () method of response does not send any request parameters, but directly directs the page to the desired place, which is equivalent to the first time you open the browser and enter an address directly.
The redirection with request parameters is equivalent to the connection from an href node. These two situations are different.
SendRedirect () has abandoned the environment parameters in the original standard input.
There are at least 10 or more methods for redirection. on the surface, redirection can be performed, but the internal environment is different.
Same, different methods are required based on different purposes.
We can grasp the WEB system structure well only when we have a deep understanding of the underlying system, how each BYTE in the packets and memory in the network comes from, and where to go.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service