2 Replies Latest reply on Mar 5, 2009 3:59 AM by cpage cpage

    WSRP resources URLs

    cpage cpage Novice

      I have some questions about URLs of resources with remote portlet.

      I use JBoss 4.2.3 + JBossPortal 2.6.6.

      In the WSRP primer we can read :

      Producers may not offer a web interface (i.e., offer http/https ports) for content

      So I suppose the consumer should rewrite all URLs to refer to him but it seems not the case with JBossPortal.

      For example, this is the differences between local et remote portlet HTML code rendering :
      local :
      <img src="/myportlet/transparent.gif" style="background:url('/myportlet/creer.png')!important;background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='/myportlet/creer.png');" />
      remote :
      <img src="http://localhost:8180/myportlet/transparent.gif" style="background:url('/myportlet/creer.png')!important;background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale,src='http://localhost:8180/myportlet/creer.png');" />

      In this example, for the remote portlet, some URLs refers to the producer (localhost:8180) and others (in CSS) refers to relative URLs (that do not exist in the consumer).

      What is the good practice with resources in remote portlet ?

        • 1. Re: WSRP resources URLs
          Chris Laprun Master

          Our WSRP implementation doesn't currently handle resources very well. background:url in style elements are indeed not currently properly detected as targets for rewriting.

          A possible solution would be a store the static resources such as images in an easily reachable location and refer to them via an absolute URL, though I admit that this is sub-optimal.

          • 2. Re: WSRP resources URLs
            cpage cpage Novice

            Thanks for your response.
            It's a bad news for us. All our resources are given by dynamic URL (we use JSF).
            We will consider a new solution for our resources.