wood burning stoves 2.0*
The moose likes Spring and the fly likes Storing values in session - Spring MVC 3.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Storing values in session - Spring MVC 3.2" Watch "Storing values in session - Spring MVC 3.2" New topic
Author

Storing values in session - Spring MVC 3.2

Raghu Sha
Ranch Hand

Joined: Feb 02, 2013
Posts: 122
Hi,
I am using spring mvc 3.2

Which is the best way to store & retrive the values from session?

Thanks,
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

You can use @SessionAttribute to have Spring store model information on your Session and retrieve it for you.
http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/mvc.html#mvc-ann-sessionattrib

If you are looking for a more generic usage just pass in the HttpSession.



[How To Ask Questions][Read before you PM me]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Storing values in session - Spring MVC 3.2
 
Similar Threads
Passing values through multiple pages
Spring in context
how to retain /persist values in form after it submits
Spring MVC - repopulate the already entered values ?
How to create session attribute once the session is established in Spring MVC?