Dec 11th, 2012, 05:06 AM
Accessing object in multiple controller
I am using ModelAttributes to display some data from controller to JSP and getting data from JSP to controller.
It is working fine for request scope.
But now I want some objects to be accessed through multiple controller. If I set a user object in controller-A then it should travel from Controller A- JSP A - Controller B - JSP B - Controller C.
However I dont need to display the user object data in JSP-A and JSP-B. It will be just set in Controller A and used in Controller-C
I am trying to set it each time in request but not getting any solution.
My understanding is that an Model Attribute can convert the text/String into some object but if I need to send a object which contains another object then how should be accessed across controller and JSP.
I done want it to set my object in session or ApplicationContext.