Questions tagged [spring-mobile]

Spring Mobile is an extension of the Spring Framework and Spring Web MVC that aims to simplify the development of mobile web applications.

Spring Mobile is an extension of the Spring Framework and Spring Web MVC that aims to simplify the development of mobile web applications. Spring Mobile is a framework that provides capabilities to detect the type of device making a request to your Spring web site and serve alternative views based on that device. Like all Spring projects, the real power of Spring Mobile is found in how easily it can be extended.

Features:

  • A Device resolver abstraction for server-side detection of mobile and tablet devices
  • Site preference management that allows the user to indicate if he or she prefers a "normal", "mobile", or "tablet" experience
  • A site switcher capable of switching the user to the most appropriate site, either mobile, tablet, or normal, based on his or her device and optionally indicated site preference
  • Device aware view management for organizing and managing different views for specific devices

More Information:

Getting Started Guides:

Related Tags:

34 questions
9
votes
7 answers

Is there any design pattern to switch between data depending on the device type?

We have a spring MVC based web application. Now we need to modify this application so that it renders properly on the smartphones. For this we are going to create separate JSP's for the smartphones. So, ones the request comes from the browser we…
ajm
  • 12,863
  • 58
  • 163
  • 234
7
votes
1 answer

Spring Mobile: how to add DeviceWebArgumentResolver programmatically?

Spring mobile documentation suggest adding the following configuration:
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
6
votes
2 answers

How to cache REST responses, Spring For Android

The goal is to cache some responses from web service. I am using Spring for Android framework - http://www.springsource.org/spring-android#documentation to communicate with restful service. As I know I can add caching into application using some…
Ruzard
  • 1,167
  • 3
  • 16
  • 33
5
votes
0 answers

Alternative to spring-mobile

I have a requirement where in all controllers I need to understand device type (desktop, mobile, tablet) and based on that I may need to send request to a different view. Right now, I have littered my controllers with duplicate code that does…
Abhinav
  • 3,322
  • 9
  • 47
  • 63
5
votes
2 answers

Desigining a mobile app for an existing Spring MVC application (Spring Mobile or Phonegap)

I created a web application on Openshift using Spring MVC and MySQL. Now I want to go mobile for this application. I want to publish the same application as a mobile app (Android mainly). Primarily, this mobile version should play with…
karthik
  • 463
  • 1
  • 6
  • 16
4
votes
0 answers

Trying to add Spring Mobile to my current Spring MVC Project

I am trying to add Spring Mobile to my current Spring MVC Project but I keep getting the following error: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is…
SJS
  • 5,607
  • 19
  • 78
  • 105
3
votes
2 answers

How to Junit a RestController But with Spring Mobile (spring-mobile-device)

I have a Rest controller with a Device (Device must be resolvem, I'm using spring-mobile-device) as a Parameter. The unit test gave me a status 415. Here is the Code of @RequestMapping(method = RequestMethod.POST) public ResponseEntity
gdiazs
  • 100
  • 8
3
votes
1 answer

How can I use view resolver to return mobile or normal view?

I have a web app and I want add the mobile version to it.. So I followed this guide to add spring-mobile, but I can't get my mobile views.. I don't want add in every controller's methods this piece of code: if (device.isMobile()) { return…
Teo
  • 3,143
  • 2
  • 29
  • 59
3
votes
2 answers

Spring Mobile - Interceptor not applied? Device is null

I'm experimenting with Spring Mobile but I can't seem to get the basic example working. I have a feeling I'm missing something stupidly simple but I can't figure out what it is. Here is what I have in place... In web.xml
nmc
  • 8,724
  • 5
  • 36
  • 68
2
votes
1 answer

Spring-mobile site preference in viewresolver not in each controller

The spring mobile documentation shows how to implement a separate mobile view layer like below : @Controller public class HomeController { @RequestMapping("/") public String home(SitePreference sitePreference, Model model) { if…
NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
2
votes
1 answer

jQuery mobile - after browser refresh page totally messed up

I'm developping a jqm application with spring mobile in the back-end. Whenever I hit the browser refresh button on my mobile phone the page is completely devastated afterwards. Browsers back-button works properly. The data are still available due…
Johannes N
  • 265
  • 3
  • 17
2
votes
1 answer

Spring Mobile EnableFallback not working

I'm trying to get the fallback solution working on mobile but having some issues. I've the following jsp structure views -mobile --about.jsp -tablet --about.jsp --intermediary.jsp about.jsp intermediary.jsp Currently I don't have a intermediary.jsp…
2
votes
1 answer

Spring chaning LiteDeviceDelegatingViewResolver and InternalResourceViewResolver

I'm having trouble using Spring Mobile 1.1.2 and Spring MVC. The problem I'm having is, that in the application I have all views for desktop and for some desktop, I have mobile alternative. I use LiteDeviceDelegatingViewResolver, which delegates to…
Roman Smetana
  • 19
  • 1
  • 2
2
votes
2 answers

Can Spring Mobile Treat iOS and Android Differently?

Spring Mobile allows a Spring MVC application to detect whether a web client is a desktop/laptop, tablet, or mobile device. Is it possible to determine if a device is Android/iOS using Spring Mobile? Are there extension points for this, or would it…
DeejUK
  • 12,891
  • 19
  • 89
  • 169
2
votes
1 answer

How to integrate Spring Webflow, Spring Mobile and WURFL

I wonder if anyone can help. I am working on a Spring Webflow 2 app, where I would also like to integrate Spring Mobile 1.0 with WURFL 1.4.2. I have got Webflow and Spring Mobile working together like this:
Nathan Russell
  • 3,428
  • 5
  • 30
  • 51
1
2 3