Skip to main content

HttpSession

Learn HttpSession (Session Management, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes HttpSession is the servlet API interface ( jakarta.servlet.http.HttpSession ) that represents one user session. Get it by adding it as a controller parameter, or call request.getSession() . Main methods : setAttribute , getAttribute , removeAttribute , invalidate , getId and setMaxInactiveInterval .

More lessons in Session Management