Spring Mobile Samples
Spring Mobile is an extension to Spring MVC that aims to simplify the development of mobile web applications. This repository contains sample projects illustrating usage of Spring Mobile. See Spring Mobile on GitHub for more information about building from source.
The following sample applications demonstrate the capabilities of Spring Mobile for server-side device detection and handling. See the README within each sample project directory for more information and additional instructions.
lite-device-resolver - illustrates DeviceResolver functionality and usage.
lite-site-preference-handler - illustrates SitePreferenceHandler functionality.
lite-site-switcher-handler - illustrates SiteSwitcherHandler functionality.
lite-device-delegating-view-resolver - example showing view names adjusted based on device.
lite-device-delegating-view-resolver-xml - example using XML based configuration, showing view names adjusted based on device.
lite-showcase - combines all features of Spring Mobile to showcase the use of the "urlPath" site switching.
Build and Deploy
Most of the sample apps can be built and run by executing the following commands from within the app directory. See the individual README files for additional information.
Build the app:
$ mvn clean install
Deploy the .war to a Servlet 3 ServletContainer. This can be done via Maven on the command-line by running:
$ mvn tomcat7:run
Note: Alternatively, you may import the project into your IDE and deploy to a Servlet 3 container such as Tomcat 7.