Java 应用与开发 - HTTP 会话跟踪技术
议之上采用额外的技术协同的结果。 2. 掌握常用的会话跟踪技术,了解采用 URL 重写维持会话跟 踪的方法;理解 Cookie 和 Session 的协同机制,掌握使用 Cookie 和 Session 实现会话跟踪的技术。 3. 能够使用 Cookie 和 Session 编写会话跟踪代码。 大纲 会话基本概念 会话跟踪技术 本节习题 大纲 会话基本概念 会话跟踪技术 URL 重写 Cookie 会话基本概念 会话跟踪技术 本节习题 什么是会话 ▶ 在 Web 应用中把客户端浏览器开始请求 Web 服务器,访问 不同 Web 文档进行请求/响应,到结束访问的一系列过程称 为会话,即一次会话(Session)。 ▶ 当用户访问第一个 Java Web 组件时,Java EE Web 服务器 自动为用户创建一个会话对象。 例如,当当网进行图书浏览、购买、完成结算的全过程可能是一 次会话;登录 126 会话跟踪技术 本节习题 Java EE 会话对象 什么是会话对象 ▶ Java EE 规范提出了一种服务器实现会话跟踪的机制,即 HttpSession 接口,实现该接口的对象称为 Session 对象。 ▶ Session 对象保存在 Web 服务器上,每次会话过程创建一 个,为用户保存各自的会话信息提供全面支持。 ▶ 注意不要将过多的数据存放在会话对象内,如只在一个请求 期间内需要传递的数据,就不要存储在会话对象中,而应该0 码力 | 54 页 | 824.47 KB | 1 年前3跟我学Shiro - 张开涛
......................................................................................... 104 SESSION 缓存 ............................................................................................. Authorization:授权,即权限验证,验证某个已认证的用户是否拥有某个权限;即判断用 户是否能做事情,常见的如:验证某个用户是否拥有某个角色。或者细粒度的验证某个用 户对某个资源是否具有某个权限; Session Manager:会话管理,即用户登录后就是一次会话,在没有退出之前,它的所有信 息都在会话中;会话可以是普通 JavaSE 环境的,也可以是如 Web 环境的; Cryptography:加 SessionManager:如果写过 Servlet 就应该知道 Session 的概念,Session 呢需要有人去管理 它的生命周期,这个组件就是 SessionManager;而 Shiro 并不仅仅可以用在 Web 环境,也 可以用在如普通的 JavaSE 环境、EJB 等环境;所有呢,Shiro 就抽象了一个自己的 Session 来管理主体与应用之间交互的数据;这样的话,比如我们在 Web0 码力 | 219 页 | 4.16 MB | 10 月前3Apache Shiro 1.2.x Reference Manual 中文翻译
Permissions 权限 7. Realms 8. Session Management 9. Cryptography 密码 III. Web Applications 10. Web 10.1. Configuration 配置 10.2. 基于路径的 url 安全 10.3. Default Filters 默认过滤器 10.4. Session Management 10.5. JSP 验证用户身份 用户访问权限控制,比如: 判断用户是否分配了一定的安全角色。 判断用户是否被授予完成某个操作的权限 在非 web 或 EJB 容器的环境下可以任意使用Session API 可以响应认证、访问控制,或者 Session 生命周期中发生的事件 可将一个或以上用户安全数据源数据组合成一个复合的用户 "view"(视图) 支持单点登录(SSO)功能 支持提供“Remember Me”服务,获取用户关联信息而无需登录 Authorization(授权), Session Management(会话管理), Cryptography(加密)被 Shiro 框架的开发团队称之为应用安全的四大基石。那么就让我们来 看看它们吧: Authentication(认证):用户身份识别,通常被称为用户“登录” Authorization(授权):访问控制。比如某个用户是否具有某个操作的使用权限。 Session Management(会话管理):特定于用户的会话管理0 码力 | 196 页 | 2.34 MB | 1 年前3Apache Shiro参考手册中文版
所做的事情: 验证用户来核实他们的身份 对用户执行访问控制,如: 判断用户是否被分配了一个确定的安全角色 判断用户是否被允许做某事 在任何环境下使用 Session API,即使没有 Web 或 EJB 容器。 在身份验证,访问控制期间或在会话的生命周期,对事件作出反应。 聚集一个或多个用户安全数据的数据源,并作为一个单一的复合用户“视图”。 Authentication:有时也简称为“登录”,这是一个证明用户是他们所说的他们是谁的行为。 Authorization:访问控制的过程,也就是绝对“谁”去访问“什么”。 Session Management:管理用户特定的会话,即使在非 Web 或 EJB 应用程序。 Cryptography:通过使用加密算法保持数据安全同时易于使用。 也提供了额外的功 IniSecurityManagerFactory; import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.session.Session; import org.apache.shiro.subject.Subject; import org.apache.shiro.util.Factory; import org0 码力 | 92 页 | 1.16 MB | 1 年前3Apache Wicket 7.x Reference Guide
RequestCycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 9.4. Session Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 25.11. Use the Wicket session only for global data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . web-related tasks such as HTTP request/response handling, URLs mapping, storing data into user session and so on. The biggest limit of MVC frameworks is that they don’t do much to overcome the impedance0 码力 | 346 页 | 10.00 MB | 1 年前3Apache Wicket 8.x Reference Guide
RequestCycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 9.4. Session Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 25.11. Use the Wicket session only for global data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMarkupIdGenerator. The default implementation is org.apache.wicket.DefaultMarkupIdGenerator and it uses a session- scoped counter to generate the final id. A different generator can be set with the markup settings0 码力 | 350 页 | 9.95 MB | 1 年前3Apache Wicket 10.x Reference Guide
RequestCycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 9.4. Session Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 25.11. Use the Wicket session only for global data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMarkupIdGenerator. The default implementation is org.apache.wicket.DefaultMarkupIdGenerator and it uses a session- scoped counter to generate the final id. A different generator can be set with the markup settings0 码力 | 336 页 | 7.16 MB | 1 年前3Apache Wicket 9.x Reference Guide
RequestCycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 9.4. Session Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 25.11. Use the Wicket session only for global data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMarkupIdGenerator. The default implementation is org.apache.wicket.DefaultMarkupIdGenerator and it uses a session- scoped counter to generate the final id. A different generator can be set with the markup settings0 码力 | 335 页 | 7.15 MB | 1 年前3Apache ActiveMQ Artemis 1.2.0 User Manual
Management 33. Security 34. Resource Limits 35. The JMS Bridge 36. Client Reconnection and Session Reattachment 37. Diverting and Splitting Message Flows 38. Core Bridges 39. Duplicate Message prohibited sign shows an EJB session bean talking directly to the Apache ActiveMQ Artemis server. This is not recommended as you'll most likely end up creating a new connection and session every time you want createConnection(); //And we create a non transacted JMS Session, with AUTO\_ACKNOWLEDGE //acknowledge mode: Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); //We create a MessageProducer0 码力 | 244 页 | 1.46 MB | 1 年前3Apache ActiveMQ Artemis 1.1.0 User Manual
Management 33. Security 34. Resource Limits 35. The JMS Bridge 36. Client Reconnection and Session Reattachment 37. Diverting and Splitting Message Flows 38. Core Bridges 39. Duplicate Message prohibited sign shows an EJB session bean talking directly to the Apache ActiveMQ Artemis server. This is not recommended as you'll most likely end up creating a new connection and session every time you want createConnection(); //And we create a non transacted JMS Session, with AUTO\_ACKNOWLEDGE //acknowledge mode: Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); //We create a MessageProducer0 码力 | 234 页 | 1.40 MB | 1 年前3
共 383 条
- 1
- 2
- 3
- 4
- 5
- 6
- 39