我想从每个运行更改的html文件在jsf Web应用程序中显示图形图像。 问题是显示的图像总是相同的。强制重载图像jsf
我试图通过在图像名称的末尾生成一个随机数来解决这个问题。
public String getImageId() {
String imageId = "";
int nb = (int)Math.random();
imageId = "?id="+Integer.toString(nb);
return imageId;
}
然后,我把它在我的JSF页面
<h:graphicImage value="/images/Report.html_files/img_0_0_0#{MyBean.imageId}" cacheable="false" />
但没有什么变化。
你对此有什么想法吗? 感谢