This sample app demonstrates many of the capabilities of the Spring Mobile Device module, including:
- "Lite" device resolution through the use of DeviceResolverHandlerInterceptor
- Site preference management
- Site switching configured for the mDot strategy
-
Build the app:
$ mvn clean install
-
Deploy the .war to a Servlet 2.5 or > ServletContainer. This can be done via Maven on the command-line by running:
$ mvn tomcat:run
Note: Alternatively, you may import the project into your IDE and deploy to a Servlet 2.5 or > container such as Tomcat 6 or 7.
-
Access the project at the following URL:
http://localhost:8080/lite-interceptor-mdot
Note: Accessing this URL from your browser versus an Android emulator or iOS simulator will demonstrate the functionality
In order for the site switcher demonstration to work in a local test environment, you will need to add the following to your hosts file; for example, /etc/hosts on Unix and OS X systems:
127.0.0.1 testdomain.com
127.0.0.1 m.testdomain.com