Skip to main content

Session Attributes

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

Fresher Notes @SessionAttributes on a controller class lists model attribute names that Spring keeps in the HTTP session between requests. @SessionAttribute (singular) on a method parameter reads one existing session attribute, for example @SessionAttribute("user") User u . SessionStatus : call status.setComplete() to remove the attributes that @SessionAttributes stored.

More lessons in Session Management