Java 应用与开发 - HTTP 会话跟踪技术掌握常用的会话跟踪技术,了解采用 URL 重写维持会话跟 踪的方法;理解 Cookie 和 Session 的协同机制,掌握使用 Cookie 和 Session 实现会话跟踪的技术。 3. 能够使用 Cookie 和 Session 编写会话跟踪代码。 大纲 会话基本概念 会话跟踪技术 本节习题 大纲 会话基本概念 会话跟踪技术 URL 重写 Cookie Java EE 会话对象 本节习题 大纲 会话基本概念 会话基本概念 会话跟踪技术 本节习题 接下来⋯ 会话基本概念 会话跟踪技术 URL 重写 Cookie Java EE 会话对象 本节习题 大纲 会话基本概念 会话跟踪技术 本节习题 什么是会话 ▶ 在 Web 应用中把客户端浏览器开始请求 Web 服务器,访问 不同 Web 文档进行请求/响应,到结束访问的一系列过程称 为会话,即一次会话(Session)。 ▶ 当用户访问第一个 Java 服务器取得参数信息,完成客户端信息的保存。 2. 隐藏表单字段 将要保存的客户信息,如用户登录账号使用 隐藏表单字段发送到服务器端,完成 Web 服务器保持客户 状态信息。 3. Cookie 使用 Java EE API 提供的 Cookie 对象,可以将客 户信息保存在 Cookie 中,完成会话跟踪功能。 4. HttpSession 对象 Java EE API 专门提供了 HttpSession 会 话对象保存客户的信息来实现会话跟踪。0 码力 | 54 页 | 824.47 KB | 1 年前3
《Java 应用与开发》课程讲义 - 王晓东235 18.3.3 设置响应头的便捷方法 . . . . . . . . . . . . . . . . . . . . . . . . . 236 18.3.4 响应对象方法——向客户端传送 Cookie . . . . . . . . . . . . . . . 236 18.3.5 响应对象方法——请求重定向 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 19.3 Cookie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 19.3.1 什么是 Cookie . . . . . . . . . . . . . . . . . . . . . . . 243 19.3.2 Java EE 规范 Cookie API . . . . . . . . . . . . . . . . . . . . . . . . 243 19.3.3 Cookie 的主要方法 . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 19.3.4 将 Cookie 保存到客户端 . . . . . . .0 码力 | 330 页 | 6.54 MB | 1 年前3
跟我学Shiro - 张开涛JSESSIONID Cookie 维护会话,且会话默认是跟容器绑定的; 在某些情况下可能需要使用自己的会话机制,此时我们可以使用DefaultWebSessionManager 来维护会话: sessionIdCookie 是 sessionManager 创建会话 Cookie 的模板: sessionIdCookie.name:设置 Cookie 名字,默认为 JSESSIONID; sessionIdCookie.domain:设置 Cookie 的域名,默认空,即当前访问的域名; sessionIdCookie.path:设置 Cookie 的路径,默认空,即存储在域名根下; sessionIdCookie.maxAge:设置 Cookie 的过期时间,秒为单位,默认-1 表示关闭浏览器时 过期 Cookie; sessionIdCookie.httpOnly:如果设置为 ,使用 HttpOnly cookie 有助于减少某些类型的跨站点脚本攻击;此特性需要实现了Servlet 2.5 MR6 及以上版本的规范的 Servlet 容器支持; sessionManager.sessionIdCookieEnabled:是否启用/禁用 Session Id Cookie,默认是启用的; 如果禁用后将不会设置 Session Id Cookie,即默认使用了 Servlet0 码力 | 219 页 | 4.16 MB | 10 月前3
Apache Unomi 2.x - DocumentationTHE CURRENT PROFILE By default, Unomi uses a cookie called context-profile-id to keep track of the current profile. You can use this the value of this cookie which contains a UUID to lookup the details /context.json and /eventcollector will now look up profiles by profile ID or aliases from the same cookie ( context-profile-id ) or body parameters ( profileId ) Verb Path Description GET /cxs/profil original profile and replace it with the merged profile (aka "master" profile). Once this is done, all cookie tracking will use the merged profile. To test, simply configure the action in the "login" or "facebookLogin"0 码力 | 117 页 | 4.78 MB | 1 年前3
Spring Framwork Web on Servlet Stack v5.3.36 SNAPSHOT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Cookie Resolver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . following selection of locale resolvers is included in Spring. • Time Zone • Header Resolver • Cookie Resolver • Session Resolver • Locale Interceptor Time Zone In addition to obtaining the client’s system. Note that this resolver does not support time zone information. Cookie Resolver This locale resolver inspects a Cookie that might exist on the client to see if a Locale or TimeZone is specified0 码力 | 259 页 | 3.58 MB | 1 年前3
基于 Java EE 的企业应用系统设计 - Spring MVC 02维护并提供访问隐式对象的能力。 ▶ pageContext ▶ initPararm ▶ param ▶ paramValues ▶ header ▶ headerValues ▶ cookie ▶ applicationScope ▶ sessionScope ▶ requestScope ▶ pageScope 大纲 转换器和格式化(Converter and Formatter) 参数。 O cookie 隐式对象 cookie 可以用来获取一个 cookie。这个对象表示当 前 HttpServletRequest 中所有 cookie 的值。例如,为了获取名为 jsessionid 的 cookie 值,要使用以下表达式: ${cookie.jsessionid.value} 获取 jsessionid cookie 的路径值要使用以下表达式: ${cookie.jsessionid0 码力 | 56 页 | 866.07 KB | 1 年前3
Spring Boot 2.6.12 Reference Documentation location of session data (server.servlet.session.store-dir), and session-cookie configuration (server.servlet.session.cookie.*). • Error management: Location of the error page (server.error.path) and container. TIP See the ServerProperties class for a complete list. SameSite Cookies The SameSite cookie attribute can be used by web browsers to control if and how cookies are 194 submitted in cross-site is missing. If you want to change the SameSite attribute of your session cookie, you can use the server.servlet.session.cookie.same-site property. This property is supported by auto-configured Tomcat0 码力 | 723 页 | 14.24 MB | 1 年前3
Spring Boot 2.6.x Reference Guidelocation of session data (server.servlet.session.store-dir), and session-cookie configuration (server.servlet.session.cookie.*). • Error management: Location of the error page (server.error.path) and container. TIP See the ServerProperties class for a complete list. SameSite Cookies The SameSite cookie attribute can be used by web browsers to control if and how cookies are 193 submitted in cross-site is missing. If you want to change the SameSite attribute of your session cookie, you can use the server.servlet.session.cookie.same-site property. This property is supported by auto-configured Tomcat0 码力 | 722 页 | 14.26 MB | 1 年前3
Spring Boot 2.6.13 Reference Guidelocation of session data (server.servlet.session.store-dir), and session-cookie configuration (server.servlet.session.cookie.*). • Error management: Location of the error page (server.error.path) and container. TIP See the ServerProperties class for a complete list. SameSite Cookies The SameSite cookie attribute can be used by web browsers to control if and how cookies are 194 submitted in cross-site is missing. If you want to change the SameSite attribute of your session cookie, you can use the server.servlet.session.cookie.same-site property. This property is supported by auto-configured Tomcat0 码力 | 724 页 | 14.30 MB | 1 年前3
Spring Framework 1.1.1 Referenceof the client's operating system. 12.6.2. CookieLocaleResolver This locale resolver inspects a Cookie that might exist on the client, to see if there's a locale specified. If so, it uses that specific the name of the cookie, as well as the maximum age. 3clientlanguage
共 301 条
- 1
- 2
- 3
- 4
- 5
- 6
- 31













