Uploaded image for project: 'Portals Bridges (Retired)'
  1. Portals Bridges (Retired)
  2. PB-10

Double slash in URL generated by html:rewrite with resource in module

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0
    • struts
    • None
    • JBoss 4.0.2, Tomcat 5.x; Liferay 3.6.1

    Description

      I am using the struts bridge taglib to perform an HTML rewrite to include some javascript resources, and the URL generated includes a double slash:
      The URL I need is: <script language='JavaScript' src='/WebFacing/webfacing/ClientScript/webface5122.js'></script>
      The URL I get is: <script language='JavaScript' src='/WebFacing//webfacing/ClientScript/webface5122.js'></script>

      Note: the browser doesn't complain, but it is not correct.

      1) My portal is deployed to the "root" context.
      2) My struts-bridge portlet is deployed to the context "/WebFacing", which also includes a Struts module called "webfacing" (under a directory called "webfacing"). So, most resources need to be included (from the root) as "/WebFacing/webfacing/ClientScript/usr/myscript.js" (for example)
      3) The JSP has (note: this runs within the module "webfacing"):
      <script language='JavaScript' src='<html:rewrite page="/ClientScript/webface5122.js" />'></script>
      4) The struts-portlet-config.xml has:
      <portlet-url-type>
      <resource path="/webfacing/ClientScript/"/>
      ...
      5) But, in the HTML that gets generated, the URL is see is:
      <script language='JavaScript' src='/WebFacing//webfacing/ClientScript/webface5122.js'></script>
      Note the double slash.

      thanks, james

      Attachments

        Activity

          People

            ate Ate Douma
            jamesschopp James Schopp
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: