Cookies
- Open: http://localhost:8080/index.html.
- Go to Servlet Examples.
- Look at Cookies source.
- Execute Cookies servlet. Set some cookies.
- Go back to Servlet Examples.
- Execute Request Headers example and note the cookies.
- Note that in the book's Cookie example (p. 948), Cookies may have a MaxAge set.
- Look at real code in %TOMCAT-HOME%\webapps\examples\WEB-INF\classes
Session Data
Do the same thing for sessions.
- Open: http://localhost:8080/index.html.
- Go to Servlet Examples.
- Look at Sessions source.
- Execute Sessions servlet. Set some session values.
- Note that the sessionID is a cookie value.
- Look at real code in %TOMCAT-HOME%\webapps\examples\WEB-INF\classes