- 3
- 0
- 约8.48千字
- 约 12页
- 2017-10-05 发布于河南
- 举报
web服务器通过会话跟踪客户状态(The web server tracks the customer status through sessions)
web服务器通过会话跟踪客户状态(The web server tracks the customer status through sessions)
1. add hidden fields to the HTML form, which contains data to track the status of the client;
2. rewrite URL to include data for tracking customer status;
3. use Cookie to transmit data used to track user status;
4. use the session Session mechanism;
Conversation:
HTTP is a stateless protocol, every time when the client requests access to the Web server, must establish a FTP connection, and then sends a HTTP request, when received from the Web server of the HTTP response, the FTP connection has been closed.
The Servlet specification to formulate specific Java operating mechanism based on session, the javax.servlet.http.HttpServlet interface represents a session defined in Servlet API, realize the interface must find a Servlet container, when a session begins, the Servlet container will create a HttpServlet object, the object state information can be stored in the customer (such as shopping cart), the Servlet container is assigned a unique identifier for each HttpSession object, called Session ID.
Heres an example of bookstore application that describes the sessions workflow:
1. a browser process first request random access Bookstore application in a Servlet container support session , trying to find the HTTP request Session ID Cookie said, because there is no such Cookie, so that a new session began, and then create a HttpSession object for it distribution of only Session ID, then Session ID as Cookie add HTTP response, when the browser receives the HTTP response results, which will save the Session ID Cookie said to the client.
Any 2. of the browser process continue to request access to the bookstore in the application of a support session , in the HTTP request will be included in the Cookie.Servlet container Session ID said trying to find the HTTP request that Session ID Cookie, because it can get such a Cookie, so that the request has been in a session, Servlet the container is no longer
您可能关注的文档
- 2011至2012学年度第一学期五年级数学学科课程实施计划46551(2011 to 2012 academic year first semester five grade mathematics curriculum implementation plan 46551).doc
- 2011至2012学年度第一学期五年级数学学科课程实施计划5511(2011 to 2012 academic year first semester five grade mathematics curriculum implementation plan 5511).doc
- 2011至2012学年度第一学期五年级数学学科课程实施计划7791(2011 to 2012 academic year first semester five grade mathematics curriculum implementation plan 7791).doc
- 2011至2012学年度第一学期五年级数学学科课程实施计划48375(2011 to 2012 academic year first semester five grade mathematics curriculum implementation plan 48375).doc
- 2011至2012学年度第一学期五年级数学学科课程实施计划8247(2011 to 2012 academic year first semester five grade mathematics curriculum implementation plan 8247).doc
- 2011至2012学年度第一学期五年级数学学科课程实施计划8703(2011 to 2012 academic year first semester five grade mathematics curriculum implementation plan 8703).doc
- 2011至2012学年度第一学期五年级数学学科课程实施计划53847(2011 to 2012 academic year first semester five grade mathematics curriculum implementation plan 53847).doc
- 2011至2012学年度第一学期五年级数学学科课程实施计划9159(2011 to 2012 academic year first semester five grade mathematics curriculum implementation plan 9159).doc
- 2011苏、锡。常镇四市高三第一次调研测试(答案)(2011, Su, tin. Chang town four City senior third survey test (answer)).doc
- 2011高考英语万能句子(2011 universal sentence in college entrance examination).doc
- 伟明环保-市场前景及投资研究报告-境内业务稳健运行,印尼市场贡献边际增量.pdf
- 桂东县法院系统招聘考试真题2025.pdf
- 贵州省黔南布依族2026年中考三模物理试题及答案.pdf
- 贵州省黔南州2026年中考语文二模试卷附答案.pdf
- 贵州省铜仁市2026年中考语文二模试卷附答案.pdf
- 2026上半年安徽事业单位联考合肥市庐江县招聘36人备考题库及一套完整答案详解.docx
- 贵州省毕节市2026年中考语文一模试卷附答案.pdf
- 贵州省贵阳市南明区2026年中考语文一模试卷附答案.pdf
- 2026上半年安徽事业单位联考合肥市庐江县招聘36人备考题库及一套参考答案详解.docx
- 贵州省贵阳市白云区2026年中考二模物理试题附答案.pdf
原创力文档

文档评论(0)