First of all, thank you very much for my support of the article, I was just to find their own direction in the university students, of course, my knowledge and ability is limited, is currently trying to learn in the bad, when I see their first published to CSDN home page of the article only a few hours to read more than 100, for me is undoubtedly a great encouragement , flattered me really moved, thank you very much for my support, anyway, we are standing on the shoulders of giants to get everything, in the social competition is so fierce today, especially the rapid development of IT industry, we need to learn a lot of things every day to keep up with the rhythm of society, My idea is to put the real things I have mastered through the text of the way to show you, want to put more practical things to share with you. Of course, in the article I just put my ideas to tell you, if you have any good method or set up, welcome to add friends or comments or messages pointed out. From today onwards, I decided to step into the IT sector, please the predecessors of a lot of advice, this process I know very hard, but I will continue to work hard ...
Here is my own shopping cart example, with the JSP built-in session object, in the client and server implementation of a conversation, the last case I also said, after the client and the server link until the logoff, the session object has always existed.
First set up a client page, I do very simple, the purpose is to hope that we first clear this process, it is important that the idea, the code in the relevant position I also added a note.
The next step is to display the shopping cart page, when the client clicks on the "show Shopping Cart" when the server responds back to the page to display the current shopping cart information, the entire process session object has been present.
Well, a complete shopping cart is realized.
Summing up: First we need to establish a client-server link (here I have connected, the connection method see the previous article) has produced a Session object, as long as the client and the server constantly open connection, the session has always existed, Otherwise, many clients in the case of the server how to identify who is still connected or who offline, are through the Session object implementation. The server then obtains the information submitted by the client to execute the corresponding JSP program (that is, to identify what the client bought), and finally when the client clicks on "Show cart", the server returns to the shopping cart page, showing which books the client is currently buying.
I hope you understand this process, the process of understanding, for the future of web development is very helpful, we have a lot of things are built on the session object. Please comment or leave a message if you have any questions.
JSP programming Technology 5-Shopping Cart implementation-session Session Object