1 Reply Latest reply on Aug 15, 2010 5:48 AM by trong.tran

    why doesnt load images to .jsp page?

    fernando2010

      Hi

       

      I have a portlet, in this show a simple image .jpg with:

       

      <img src="../images/tiger.jpg" width="136" height="138" alt="tiger"/>

       

      the file and location exist, but when put my portlet in:

      $GATEIN_HOME\server\default\deploy

      as "myportlet.war" file, the image dont show, I opened "myportlet.war" and the is included.

      so, which is the cause?

       

      thanks.

        • 1. Re: why doesnt load images to .jsp page?
          trong.tran

          the cause is that your portlet's content is showed as a fragment in portal page context, therefore your relative path will not work correctly.

           

          A suggestion is to use absolute path like : <img src="/myportlet/images/tiger.jpg" width="136" height="138"  alt="tiger"/>