Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1336

Liferay 6.1 + JBoss 7.1 + ZK 6 : Cannot encode relative URLs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: 6.0.0, 6.0.1
    • Fix Version/s: 6.0.3, 6.5.1
    • Component/s: General
    • Labels:
    • Environment:

      Windows 7 64 bit, Liferay 6.1, JBoss 7.1
      Reproductible on JBoss 7.0 and Linux as well

      Description

      If we use directives such as <style src="./css/custom.css" /> (or any relative URL), Liferay raises an exception complaining that the URL is not an absolute one :

      13:56:15,329 GRAVE [org.zkoss] (http--0.0.0.0-8080-2) >>java.lang.IllegalArgumentException: URL path must start with a '/' or include '://'
      >> at com.liferay.portlet.PortletResponseImpl.encodeURL(PortletResponseImpl.java:410)
      >> at org.zkoss.web.portlet.RenderHttpServletResponse.encodeURL(RenderHttpServletResponse.java:118)
      >> at org.zkoss.web.servlet.http.Encodes.encodeURL0(Encodes.java:513)
      >> at org.zkoss.web.servlet.http.Encodes.access$000(Encodes.java:47)
      >> at org.zkoss.web.servlet.http.Encodes$1.encodeURL(Encodes.java:429)
      >> at org.zkoss.web.servlet.http.Encodes.encodeURL(Encodes.java:402)

      That exception leads to nothing being displayed on the ZK portlet.

      Absolute (/path) and full (http[s]://host/path) urls are not concerned by this issue.
      Tested on ZK 6.0.0 & ZK 6.0.1.

      Workaround : use absolute or full urls (doesn't allow to use the same zul pages for both servlet and portlet modes).
      Possible correction : do not let Encodes.URLEncoder implementations to raise untyped exceptions or create a specific Encodes.URLEncoder for Liferay.

        Attachments

          Activity

            People

            Assignee:
            neillee neillee
            Reporter:
            jezelinside jezelinside
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: