Tagged articles
2 articles
Page 1 of 1
IT Xianyu
IT Xianyu
Oct 25, 2020 · Backend Development

Understanding HttpSession: Concepts, Methods, and Practical Examples

This article explains the fundamentals of HttpSession in Java web applications, covering its server‑side nature, underlying JSESSIONID cookie mechanism, lifecycle, common API methods, configuration, and provides several practical code examples such as login verification, shopping cart handling, duplicate‑submission prevention, and cookie‑disabled session strategies.

HttpSessionJavaServlet
0 likes · 9 min read
Understanding HttpSession: Concepts, Methods, and Practical Examples
Programmer DD
Programmer DD
Jun 18, 2020 · Backend Development

Why Closing the Browser Doesn’t End Your Java Session – HttpSession and Cookie Sharing Across Ports

This article explores the inner workings of Java HttpSession in Tomcat, explains how sessions are stored in a thread‑safe map, examines the relationship between sessions and cookies, and investigates why browsers share cookies across different ports on the same host, leading to unexpected session behavior.

CookieHttpSessionJava
0 likes · 13 min read
Why Closing the Browser Doesn’t End Your Java Session – HttpSession and Cookie Sharing Across Ports