DisplayTag
  1. DisplayTag
  2. DISPL-595

Displaytag not WSRP compatible - Dynamic url parameter causes WSRP rewrite to fail, generates invalid portal url

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.1
    • Fix Version/s: None
    • Component/s: Container Compability
    • Labels:
      None
    • Application server:
      Websphere 6.1, Websphere Portal 6.0

      Description

      Portlet is being provided by a WAS 6.1 server and consumed by Websphere Portal 6.0 via WSRP. Using spring portlet MVC and displaytag 1.1.1.

      Issue is that all renderUrls generated by displaytag that append a parameter to the url are invalid and can not be encoded by the container. When you click on the link the portal server will redirect you to the landing page (navigational state is not preserved in the url). The same code will work without issues in a non-WSRP environment (everything running in portal container).

      This is the code that will generate urls that cant be encoded with WSRP:

      <portlet:renderURL var="myUrl">
      <portlet:param name="action" value="detail_page"/>
      </portlet:renderURL>
      <display:table name="searchResultList" sort="external" defaultsort="1" pagesize="10" class="display_table">
              <display:column property="myObject.myObjectId" href="${myUrl}" title="foo" sortable="true" class="display" />
      </display:table>

      This is the error thrown when the container tries to generate the urls:

      SystemOut.log:[2/12/09 10:33:22:888 CST] 00000073 Servlet W com.ibm.wps.engine.Servlet doGet() Invalid URL
      'http://localhost:10078/wps/myportal/!ut/p/c1
      /04_SB8K8xLLM9MSSzPy8xBz9CP0os3ingBCnMEdPY0N_IxNTAyO3sGAzVyMzAwMLE6B8pFm8n79RqJuJp6GhhZmroYGRmYeJk0-Yp4G7izExunHJGxgQ0B0Oci1-20HyBjiAowFEHo_9fh75uan6BbmhEQaZ
      AekAx8AZhw!!/dl2/d1/L0lDU0NTQ2xDbElKSmdrS0NsRUEhL29Kb1FBQUlRSkFBTVlwQ2pJTXhqbk1RRkpVbENrQSEhL1lCSkp3NDU3Rl9ONDUwLTVENGtzcnludy83X0JQVEJWQUkzMU8yNDUwMkZWUzZFM
      jYwMEgxL3ZpZXcvbm9ybWFsL3M2Z0daMTM2L3dzcnAtaW50ZXJhY3Rpb25TdGF0ZS9NVEoyTVRFeE1UWmhZM1JwYjI0eE1VRXhNVEU1WTJobFkydGliMjly/wsrp_rewrite'

      This is the invalid (non-encoded) url that can't be parsed by portal when you click on it:

      http://localhost:10078/wps/myportal/!ut/p/c1/04_SB8K8xLLM9MSSzPy8xBz9CP0os3ingBCnMEdPY0N_IxNTAyO3sGAzVyMzAwN3Q6B8pFm8n79RqJuJp6GhhZmroYGRmYeJk0-Yp4G7izExunHJGxgQ0B0Oci1-20HyBjiAowFEHo_9fh75uan6BbmhEQaZAekAgMbcIA!!/dl2/d1/L0lDU0NTQ2xDbElKSmdrS0NsRUEhL29Kb1FBQUlRSkFBTVlwQ2pJTXhqbk1RRkpVbENrQSEhL1lCSkp3NDU3Rl9ONDUwLTVENGtzcnludy83X0JQVEJWQUkzMU8yNDUwMkZWUzZFMjYwMEgyL3ZpZXcvbm9ybWFsLzFvWjpJMTY0L3dzcnAtaW50ZXJhY3Rpb25TdGF0ZS9NVEoyTVRFeE1UWmhZM1JwYjI0eE1VRXhNVEl4Tlcxa1psOWtaV0ZzWDNObFlYSmphQSoq/wsrp_rewrite?wsrp-windowState=wsrp%3Anormal&wsrp-secureURL=false/wsrp_rewrite&wsrp-urlType=render&wsrp-navigationalState=MTJ2MTEyMjEyc3VibWl0YnV0dG9uMTFBMTExNnNlYXJjaDE2YWN0aW9uMTFBMTEyMTVtZGZfaGVhZGVyX3NhdmU*&myObjectId=10001&wsrp-mode=wsrp%3Aview

      A proper url should look something like this (page and sort links work, oddly enough):

      http://localhost:10038/wps/myportal/!ut/p/c1/hY3LcoJAEEW_JV8wzdNhCchjwgADAkE2FEFFiIOUBlLx68VKVqmQ9F11nXvroALN6aupbar39txXJ5SjQi0dx8eet5EAh3gFog1RxOIUAEsz36plEIqpLRNBwKolgKi6skEzAs5a-mf98vD9vX9wWDgdvviSwRFR4J75Hm1RsVpsuQJKUA5yuelg8Om1929ayBJfIUmthJ_XkglN7Q1jU_GBVzzsuAp1RQ4-1Uw_eDv0NnHV8Zg7Y_zKO9IYIOHWQvnU7j9-mMFYa7M509MIZ_Mrf7d-8VNLCah1CVurpDfz9Ex3lO2yODV004wnBmjgObTseJE4eboD94HH2w!!/dl2/d1/L0lDU0lKSmdvS1VRIS9JSFNBQ0lpTXlDb3FiRUFvSUEhIS9ZQTQ1NDUwLTVGMHN0eWp3LzdfR0dNOEtLUzMwMEJEOTAyRlZBVVE4VjMwMDQvdExXN28xNzYvZmlsdE1zdHJJZC81NQ!!/#7_GGM8KKS300BD902FVAUQ8V3004

      As a workaround, I have had to create the links in the controller and then pass in on the display binding object and use the displaytag "Value" property to render in the jsp...this way there is no chance that displaytag mucks around with the url. I can't even get scriptlets doing the same thing using object_rowNum to create the renderUrl to work. I do not have this issue anywhere else in the application so I suspect that displaytag is doing something non-orthodox when it comes to generating these urls.

      This is probably an issue with the order or manner in which displaytag is appending the parameter to the url which prevents the portal from being able to encode the wsrp part of the url properly. I would like to get this fixed and contribute to the project but am not sure where to start looking. Please advise.




        Activity

        Hide
        Dale added a comment -
        I just spent a couple hours stepping through the code and it looks like column and paging links are constructed using the portletHref class but user-embedded links are made using the defaultHref class. Can anyone explain the rationale behind this?
        Show
        Dale added a comment - I just spent a couple hours stepping through the code and it looks like column and paging links are constructed using the portletHref class but user-embedded links are made using the defaultHref class. Can anyone explain the rationale behind this?

          People

          • Reporter:
            Dale
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: