Servlet中的会话跟踪

  1. 会话跟踪
  2. 会话跟踪技术

会话只是意味着特定的时间间隔。

会话跟踪是一种维护用户状态(数据)的方法。它在servlet中也称为会话管理。

Http协议是无状态的, 因此我们需要使用会话跟踪技术来维护状态。每次用户向服务器请求时, 服务器都会将该请求视为新请求。因此, 我们需要维护用户的状态以识别特定用户。

HTTP是无状态的, 这意味着每个请求都被视为新请求。如下图所示:

会话跟踪

为什么要使用会话跟踪?

识别用户用于识别特定用户。


会话跟踪技术

会话跟踪中使用了四种技术:

  1. 曲奇饼
  2. 隐藏表格栏位
  3. URL重写
  4. HttpSession
微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_47562.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?