I want to create a filter that will execute before any of my spring mvc controller actions.
I want to check for the existence of a cookie, and then store an object somewhere for the current request only.
I then need to reference this object (if it exists) from within my controller action.
Suggestions on how to do this?
to create the filter just make a class that implements javax.servlet.Filter, in your case can be something like this
then declare the filter in your web.xml
at this point in your controller just check if the attibute exists in the request using request.getAttribute(“myCoolObject”)