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.
-
thorax-lumbar-client - showcases the use of Spring Mobile with JavaScript libraries
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.
Pull requests are welcome. See the contributor guidelines for details.
See a screencast demonstration based on Spring Mobile 1.0.0.M2.
Spring Mobile is released under version 2.0 of the Apache License.