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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Normal Normal
    • 6.0.3, 6.5.1
    • 6.0.0, 6.0.1
    • General
    • Windows 7 64 bit, Liferay 6.1, JBoss 7.1
      Reproductible on JBoss 7.0 and Linux as well

    • None

      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.

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

              Created:
              Updated:
              Resolved: