May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, you'll learn how to use a subfolder in the URL for the mobile pages of your website. For example:
mysite.com for the normal websitemysite.com/mobile for the mobile versionMake sure that the SitePreferenceHandlerInterceptor interceptor is declared in the Spring configuration. Refer to the Switching to the normal view on mobiles recipe in this chapter.
Follow these steps to use a subfolder path for the mobile version of the website:
SiteSwitcherHandlerInterceptor bean initialized with the urlPath() method with the subfolder name and the web application root path if necessary:@Bean public SiteSwitcherHandlerInterceptor siteSwitcherHandlerInterceptor() ...
Read now
Unlock full access