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

Context root with "/" in the middle leads to an error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.1
    • 3.1.0
    • portal driver
    • None

    Description

      A portlet application with context root /online/ReferenzPortlets leads to an error when submitting a form - the url of the form cannot be executed - HTTP 400.

      This is due to the character which replaces the middle "/" in the portlet id part of the URL.

      To my analyses the problem arises in the class org.apache.pluto.driver.url.impl.PortalURLParserImpl in the method "toString" at line 454.

      for (String pid : portalURL.getPortletIds()) {
      pids.add(pid);
      buffer.append(TOKEN_DELIM).append(PREFIX).append(PORTLET_ID);
      try

      { buffer.append(URLEncoder.encode(pid, "UTF-8")); }

      catch(Exception e)

      { LOG.warn("Could not encode pid=" + pid); }

      buffer.append(DELIM).append(String.valueOf(pids.indexOf(pid)));
      }

      I suggest to replace the expression URLEncoder.encode(pid, "UTF-8") with urlEncode(pid). In the decode part there is already the use of the urlDecode method on the pid part of the URL.

      Attachments

        Activity

          People

            ngriffin7a Neil Griffin (Inactive)
            petermeyer Peter Meyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: