Running sessions on a Java web server?

What is the best (safest) way to implement session processing on a web server? I would like to add this, but I don’t know how to implement it. Is a cookie "required" for session processing? (To determine which session)

+5
source share
3 answers

Session handling is not really a concern. It is handled by a class HttpSession(read the description in javadoc!), Which you can get by calling request.getSession().

It works in two ways (you do not need to do anything to support them):

  • using session cookies (if cookies are allowed)
  • url-rewriting - (JSESSIONID) URL-.

(: (Tomcat, ..), HttpSession)

+6

, , . . , JavaEE, API , ( cookie URL).

+2

-. , https ( web.xml).

, , -. , , - . , :)

+1
source

All Articles