Reputation: 2069
I have the following setting:
Request Made -> Controller gets Request and prepares response -> Response is sent -> Response is intercepted by a InternalResourceView Class that redirects to a Template jsp that makes a CompositeView (Header, Main Page - the one in response, Footer) -> Templated is loaded with desired page included.
I want model attributes to survive until the end, so that in the page included with the Template it can be read. The same goes for errors (Im using Spring tags).
How to do it?
Upvotes: 0
Views: 146
Reputation: 8495
In Controller, set value into Session attribute and get it wherever you want.
request.getSession().setAttribute("name", "value");
and to get it in JSP,
${sessionScope.name}.
Upvotes: 2