I was using the following script to reference images in my reports. I just put a fresh install of BIRT 3.7 on a new machine but now when I preview the report it cannot find the images. Is there a way to tell what BIRT is using as the BIRT home directory? I'd like to know what is different between my old installation and this one with regards to why this same script no longer works? Unfortunately I no longer have access to my old installation to compare it with (machine died), but it must be environmental as all the BIRT source is identical.
function imagePath(imageName) {
if (reportContext.getHttpServletRequest().getAttribute("attributeBean").isDesigner() ) {
return "/WebContent/report/images/"+imageName
}
else
{
return "/report/images/"+imageName
}
}
Well I got it working but I still don't know the actual reason why there was a difference between the two installations? I changed the script to use a relative path (eg., "images/...") rather than the absolute path (eg., "WebContent/report/images/..."). This is the better approach but I still don't know why the root directory which the absolute path was using was different between installations?