Reading an attribute from the session

This value can be accessed in other controllers by first specifying the @SessionAttributes annotation at a type level:

    @Controller 
@SessionAttributes("exampleSessionAttribute")
public class SomeOtherController {

The value of the session attribute will be made available directly to all model objects. So, it can be accessed from the model:

   Value sessionValue =(Value)model.get("exampleSessionAttribute");

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset