Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-50

PortletURL.setParameter("key.with.dot", ...) breaks portal

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • unspecified
    • 1.0.1-rc2
    • portal driver
    • None
    • Operating System: All
      Platform: All
    • 29421

    Description

      When a key is used with "." (DOT) in PortletURL.setParameter("key.with.dot",
      ...), pluto portal breaks and gives SEVERE error.
      Exception will be "java.lang.NumberFormatException: For input string: with", if
      key="key.with.dot"

      Same problem occurs for renderParameters, as reported here
      http://nagoya.apache.org/eyebrowse/ReadMsg?listName=pluto-user@jakarta.apache.org&msgNo=688

      It is a common practice to use DOT's for key. I did some investigation and here
      is what I found:

      this method
      org.apache.pluto.portalImpl.core.PortalURL.analyzeRequestInformation() is
      tokenizing on "/" and "." for parameters, which is not allowing to have a key
      with "." (DOT).

      Because of internal encoding, any render param's value should start with an int,
      representing the count.. here "with" becomes value for key "key".. as a result
      method PortalControlParameter.decodeRenderParamValues() line 74 throws an NFE,
      which appears as:
      "java.lang.NumberFormatException: For input string: with"

      Is DOT reserved for internal use or is there any specific reason for not
      allowing DOT in keys? otherwise we can fix it as follows:

      [portal\src\java\org\apache\pluto\portalImpl\core\PortalURL.java, line 377: ]

      StringTokenizer tokenizer = new StringTokenizer(pathInfo, "/.");

      following will fix the issue:
      StringTokenizer tokenizer = new StringTokenizer(pathInfo, "/");

      Attachments

        Activity

          People

            Unassigned Unassigned
            pradeep.gond@sun.com Pradeep
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: