bharathi
bharathi

Reputation: 6271

Session in spring MVC

Can anyone know at which point the user session is getting created in spring MVC?

Whether once the user request reaches the controller layer or Service layer or DAO layer.

Whether the DispatcherServlet is responsible for creating the JSessionID for each user and at what point it will get created?

Upvotes: 2

Views: 613

Answers (1)

NimChimpsky
NimChimpsky

Reputation: 47290

A session is created when an http request is received by the servlet container - tomcat, glassfish etc.

It is independent of spring. However you can associate @SessionAttributes with sessions, although I try and avoid this and keep everything stateless.

Upvotes: 2

Related Questions