在我的项目中,我创建图像并将它们放在目录中:
// Save process diagram to a file
InputStream processDiagram = repositoryService.getProcessDiagram(processInstance.getProcessDefinitionId());
try {
FileUtils.copyInputStreamToFile(processDiagram, new File("/home/ilyass/selectSystemWorkspace/Core/selectsystem-view/src/main/webapp/images/workflow/Process11.png"));
} catch (IOException e) {
e.printStackTrace();
}
现在我想在我的xhtml页面中使用:
显示它 <h:graphicImage value="/images/workflow/Process11.png" />
问题是没有刷新目录我无法检索图像!我试图根据这里找到的解决方案将此行添加到我的tomcat server.xml:Load images from outside of webapps / webcontext / deploy folder using or tag
<Context docBase="/home/ilyass/selectSystemWorkspace/workflow/" path="/workflow" />
但是仍然一样,因为我在项目中创建图像并将它们放入文件夹,任何想法如何解决