The class you're probably looking for is org.springframework.web.servlet.HandlerInterceptor . You can implement the postHandle method on this interface and, as the signature suggests, have access to both the request and the response, as well as the object map of the model that your controller created. (and the controller itself, which is the Object handler parameter.)
You enable them by adding them to the handler mapping in the dispatcher servlet.
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"> <property name="interceptors"> <list> <bean class="a.package.MyHandlerInterceptor"/> </list> </property> </bean>
By the way, the binding is actually performed inside the HandlerAdapter, which finds the controller methods and calls them, this is not an interceptor.
Edit: To answer your editing, yes, this is where you have a chance to capture the model object and work with it more after the controller is done, but before it proceeds to JSP rendering. That way you can do something like adding myCustomScript to ModelMap and toss ${myCustomScript} in the <head> your jsp, get the backing object from ModelMap and check it, etc. Etc.
source share