The spring mobile documentation shows how to implement a separate mobile view layer like below :
@Controller
public class HomeController {
@RequestMapping("/")
public String home(SitePreference sitePreference, Model model) {
if (sitePreference == SitePreference.MOBILE) {
// prepare mobile view for rendering
return "home-mobile";
} else {
// prepare normal view for rendering
return "home";
}
}
}
However, I would prefer to apply the different view name(prefixing it with a folder), in the view resolver. How would I do this ?
(edit : No answers, normally spring config issues have a few responses ... have I asked a particularly stupid question ?)