Announcement Announcement Module
Collapse
No announcement yet.
The StandardSiteUrlFactory and query parameter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The StandardSiteUrlFactory and query parameter

    Currently, the StandardSiteUrlFactory class doesn't append the query parameter into the newly created url!

    Another suggestion, Add new attribute (e.g. mParameter,mParamValue) to the SiteSwitcherHandlerInterceptor.java which supports cases then mobile site is based on the query parameter.

    For example for testdomain.com it redirects to testdomain.com?${mParameter}=${mParamValue}

    //
    Reza

  • #2
    Well, lets step back a little bit and explain your requirement. Resources typically should not be identified by query parameter values, they should are addressed by a request URI. So I'm not sure preserving parameters through the redirect is ideal here, honestly (sending the site_preference parameter through the redirect is definitely not ideal, after it's already stored in the cookie).

    To your second point: why aren't cookies good enough? Do you really want to rely on a query parameter to be present on every request to force the mobile site? Wouldn't you have to rewrite each URL generated by your view templates with site_preference=mobile then?

    Keith

    Comment


    • #3
      for usecase 2,
      1) for case of web applications, IMHO, it is not a good practice to hard code the site names (e.g testdomain.com, m.testdomain.com) into the web application. may this is fine for web sites.
      We usually delivery the web.war to our clients and it supports both browser based and mobile based agents. The context root is alway relative path. http://localhost:8080/web is for browsers and http://localhost:8080/web/*?m=true is the mobile version; as well as cookie store.

      Comment


      • #4
        How do you handle encoding the m=true parameter value into every link rendered on a mobile page?

        Also, how do you handle the case where a mobile user types in one of your URLs without including the m=true parameter?

        Keith
        Last edited by Keith Donald; Dec 16th, 2010, 11:09 AM.

        Comment

        Working...
        X