Spring Version: 2.5.6
I want to resolve the view to a specific velocity file based on the value of the User-Agent header.
My current line of thinking is an implementation similar to the UrlBasedViewResolver such that the user-agent value is Map’d (via context) to a specific directory(value) based on a matching a regular expression(key).
I am almost certain there is an easier way.
A similar question was previously posted regarding Theme determination based on User-Agent. However, my understanding is that Themes relate more to static (css,js) content, not which file handles the actual response construction (HTML,XML,etc).
I am going with a custom view resolver as suggested in comments. (and upgrading my app to Spring 3.0.0)