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

IllegalArgumentException is thrown when using mailto:.. at PortletResponse#encodeURL(String)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 1.0.1
    • Fix Version/s: None
    • Component/s: portlet container
    • Labels:
      None
    • Environment:
      J2SE 1.4 on Linux

      Description

      For example, this problem occurs when you use the following JSF tag on MyFaces and Portlet environment:

      <h:outputLink value="mailto:test@test.com">...

      and also you will encounter IllegalArgumentException when using values other than ...://... and /...

      I think that the simple solution is:

      $ svn diff ./pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
      Index: pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java
      ===================================================================
      — pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java (revision 372353)
      +++ pluto-container/src/main/java/org/apache/pluto/core/impl/PortletResponseImpl.java (working copy)
      @@ -98,8 +98,7 @@

      public String encodeURL(String path) {
      if (path.indexOf("://") == -1 && !path.startsWith("/"))

      { - throw new IllegalArgumentException( - "only absolute URLs or full path URIs are allowed"); + return path; }

      PortletContainerServices services = getContainer()

        Attachments

        1. PortletResponseImpl.patch
          0.7 kB
          Shinsuke Sugaya

          Activity

            People

            • Assignee:
              ddewolf David H. DeWolf
              Reporter:
              shinsuke Shinsuke Sugaya
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: