Reputation: 2883
I need to show output of several controllers on one page.
Menu controller: adds "menuItems" collection to the model
Banner controller: adds "banner" to the model
ListItems controller: the "main" one: it adds all other data to display
My view (I use xslt) knows about model and works with it.
My question is how to call 3 controllers for one request and combine their output to the one model.
I do not want to use inheritance here (that smells). I do not want to use interceptors because they are low-level and I want to work with mapped parameters instead of request and response.
How that could be implemented in spring MVC?
Thanks!
PS: I will try to use WebRequestInterceptor probably
Upvotes: 2
Views: 2464
Reputation: 6273
You can use Handler interceptor feature of spring mvc, i have used this for menu,breadcrumb etc. you can find more for implementation example
Upvotes: 2