This tutorial discusses about the integration of spring mobile in already created spring project
Add Spring-Mobile-Device dependency in pom.xml
org.springframework.mobile spring-mobile-device 1.0.0.RELEASE
Minutes to be followed:
1) Spring version used is 3.1.1.RELEASE
2) Change spring mvc xsd 3.0 to 3.1 present in servlet-context.xml
Change the servlet-context.xml to achieve the goals offered by Spring Mobile
Device resolver abstraction
The change will help to achieve the know whether the device is mobile or tablet or normal
You can directly add the Device type in the arguments
public String home(Locale locale, Model model, Device device)
Site Preference Management
public String home(Model model, Device device, SitePreference sitePreference)
This will help to use the detect the type and control the rendering of view accordingly.
This is the most useful aspect which automatically appends /m to URL and redirect to the relevant site.
Finally we have achieved every feature of spring mobile.
Suggestionas and ideas are welcome