Announcement Announcement Module
No announcement yet.
The StandardSiteUrlFactory and query parameter Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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 which supports cases then mobile site is based on the query parameter.

    For example for it redirects to${mParameter}=${mParamValue}


  • #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?



    • #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, 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.


      • #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?

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