My websites pages are broken down into 3 parts:
- Header
- Main Content
- Footer
The header needs to access the user object to display things like the username, sign/signout links depending if the user is logged in or not.
I want my velocity templates to be like this:
inject header template, that will need access to the user object.
main content will be a spring mvc action page
footer
I know that in my spring mvc action, I will simple load my velocity template with the attributes/objects that I will need to display in the 'main content' area.
Is there a way for me to provide the 'header template' access to the attributes/objects it needs from a place OTHER than the spring mvc action?
I am new to java/spring, is there a request level collection that I can load my user object into, so I can reference it from there?