1 Reply Latest reply on Apr 2, 2009 3:10 PM by piergiorgiolucidi

    Portlet which display a picture

    margotmedia

      Hello,

      i create a Dynamic Web Project with Eclipse. I use the JBoss Toll to create a portlet. And now i will that my portlet display a picture.
      I create a new folder images in the folder WEB-INF. So i copy my picture to the images folder and now i write following lines in my java class

      writer.write("<img src=\"../images/testbild.jpg\" alt=\"testbild\">");

      but it doesn't work. My protlet disply me only a X with a popup testbild...

      Have somebody an idea?

        • 1. Re: Portlet which display a picture
          piergiorgiolucidi

          I think you cannot use relative path for images in your presentation template of the portlet.
          You must decide a template and then understand how to refer images being careful with paths.
          Portlets doesn't have paths, only pages on a portal can be referred with a URL.

          Have you tried using absolute paths?

          Hope this helps.