Details
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