0 Replies Latest reply on Apr 9, 2008 10:01 AM by Eric Smith

    how to disable header injection src prefixing?

    Eric Smith Newbie

      JBAS 4.2.2, Portal 2.6.4 I am successfully using portlet-specific header injection via a jboss-portal.xml. I have some scripts bundled within the portlet war where this works perfectly, but I have other scripts which I would like to refer to src= outside of the portlet war (at a shared site -- which is also easier for me to hardcode in dynamic <script within the portlet response because I don't know how, in javascript, to obtain the portlet site name e.g. /helloworldjspportlet/ since the site itself is /portal), so I was wondering if there was a way to either individually, or entirely, disable the src= prefixing (of the war/context name) for injected header script (and link href) tags?

      From Appendix B of the 2.6.4 ref guide:

      Example 1:
      <script type="text/javascript" src="/myscript.js"></script>
      will produce at runtime the following markup
      <script type="text/javascript" src="/my-web-application/myscript.js"></script>

      I assume I could play with the theme but I don't want to insist on a specific theme for my portlet.