spring-mobile

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

别说谁变了你拦得住时间么 提交于 2020-01-14 14:32:12
问题 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 HttpPost/Webservice security authorisation too. I know Pivotal has a Spring Mobile project which helps create a mobile site for the same application (with more sophistication like spring form tags and all). On the other hand, Phonegap can create a cross

Detecting a mobile device with spring-boot

試著忘記壹切 提交于 2020-01-14 05:29:07
问题 I am trying to get my application to detect a mobile device and render that page but I am getting no response but my index.html page is rendering. It is completely ignoring my mobile controller. @Controller public class DeviceDetection { @RequestMapping("/") public @ResponseBody String detectDevice(Device device) { if (device.isNormal()) { System.out.println("Inside isNormal()"); return "index"; } else if (device.isMobile()) { System.out.println("Inside isMobile()"); return "mobilePage"; }

How to cache REST responses, Spring For Android

守給你的承諾、 提交于 2020-01-12 08:12:14
问题 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 module from the common Spring Framework ( http://viralpatel.net/blogs/cache-support-spring-3-1-m1/ ). Am I right that it is not possible to do using just spring-for-android? What is the solution then? *I don't have any experience in a common Spring.

Spring-mobile site preference in viewresolver not in each controller

倖福魔咒の 提交于 2019-12-11 02:29:29
问题 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 (sitePreference == SitePreference.MOBILE) { // prepare mobile view for rendering return "home-mobile"; } else { // prepare normal view for rendering return "home"; } } } However, I would prefer to apply the different view name(prefixing it with a folder), in the view

Spring Mobile - Interceptor not applied? Device is null

此生再无相见时 提交于 2019-12-05 20:02:57
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 <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <filter> <filter-name>deviceResolverRequestFilter</filter-name> <filter-class>org.springframework.mobile.device