9.3.4. Including Images

This section shows how to include an image into a Report. Since the Report is rendered by Seam, the image to be included must be accessible from Seam. This can either be achieved by storing the image in a .jar file and storing this file in the .klaros/resources folder of the user running Klaros-Testmanagement, or by providing the image on a web server, from where it can be included by using HTML code in the report template.

When storing the image in a .jar file it can be easily accessed by the following code snippet.

  <p:image value="images/image.png"/>

The value attribute defines the image filename and the folder of the image location.

When providing an image via a web server it can be accessed by the following code snippet.

  <p:html>
    <img src="http://www.verit.de/images/logo-klaros-160.png" />
  </p:html>

In this case the src attribute defines the URL of the image location.