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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 1.0.1
    • None
    • portlet container
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: