Announcement Announcement Module
Collapse
No announcement yet.
Mobile Path and Root Path not working as expected Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mobile Path and Root Path not working as expected

    I have a little problem with
    webmvc_config.xml
    <bean class="org.springframework.mobile.device.site.Site PreferenceHandlerInterceptor" />

    <!-- On pre-handle, redirects mobile users to "StayAt.org/taxi/mob" (declare after DeviceResolverHandlerInterceptor) -->
    <bean class="org.springframework.mobile.device.switcher. SiteSwitcherHandlerInterceptor" factory-method="urlPath">
    <constructor-arg index="0" type="java.lang.String" value="/mob" />
    <constructor-arg index="1" type="java.lang.String" value="/taxi" />
    </bean>
    web.xml
    <servlet-mapping>
    <servlet-name>taxi</servlet-name>
    <url-pattern>/</url-pattern>
    <url-pattern>/mob/*</url-pattern>
    </servlet-mapping>
    HelloController
    strCurrentSitePreference = request.getParameter("site_preference");
    if (strCurrentSitePreference == null) {
    Device device = DeviceUtils.getCurrentDevice(request);
    // System.out.println("***** org.stayat.web.util.HelloController.isbNormal ***** device "+ device+ " device.isMobile() "+ device.isMobile());
    if (device.isMobile()) {
    bNormal = false;
    strCurrentSitePreference = "mobile";
    strTemp = "mobile";
    } else {
    bNormal=true;
    strCurrentSitePreference = "normal";
    strTemp = "normal";
    }
    }else{
    if (strCurrentSitePreference.equals("mobile")) {
    bNormal = false;
    strCurrentSitePreference = "mobile";
    strTemp = "mobile";
    } else {
    bNormal=true;
    strCurrentSitePreference = "normal";
    strTemp = "normal";
    }
    }
    main.jsf
    I have to maintain a separate panel (rendered="#{!helloController.bNormal}") instead of redirecting to a other page e.g. mobile/main.jsf mob.jsf
    did I oversee something in the documentation?
    thanks for your help
    Last edited by bussien; Mar 21st, 2013, 12:33 PM.

  • #2
    I'm having trouble understanding the issue. Can you describe what is happening, and what are your expectations? Thanks!

    Comment


    • #3
      Huh well two days back i create a new folder and uploaded the new version of the site in that folder and place the link button to redirect to new version site. when ever user click on the new version site it is redirecting to new version site. it is working fine..!

      Comment

      Working...
      X