As far as I can tell, the current site preference handling assumes the developer wants to redirect a mobile or tablet user to a different URL. In some cases it may be useful to keep the URL the same and simply render a different view depending on the device type. There are examples of handling this logic inside of a @Controller method. However, there are situations where delegating this responsibility to the controller may not be desirable. For instance, an application using Spring Web Flow tends to require view names to be statically declared in a flow.xml file.
In simpler cases, using a coding by convention approach, can remove the responsibility from the controller of picking the view name based on device type leaving this up to a convention specified by a handler interceptor. For example, consider the following code from Spring Mobile's documentation:
Here, the controller is burdened with picking the view name. However, the controller logic may be the same for both the normal site and the mobile site. Therefore, providing developers with an option of managing the view selection using a handler interceptor cuts down on boilerplate code in the controller.
If the view was adjusted by a handler interceptor such as:
The controller could be simplified to: