Current lesson | Lesson 39/53

Cookies: What They Are, How to Create and Read Them (Part 1)

Java Servlet and Apache Tomcat: Complete Course from Scratch with Eclipse 0%
I'll explain what Cookies are in Java Servlets, how they work in the HTTP protocol, and what they're used for to maintain state between stateless requests. We'll see how to create a cookie with new Cookie(name, value) server-side, set its duration with setMaxAge(), and read it in subsequent requests.
Instructor
Up next Cookies in Practice: Advanced Creation and Reading (Part 2)