jsf 2 - Force reload image jsf -


I would like to display an HTML file to a graphic image in a Jesf Web applications that change for each run. The problem is that the displayed image was always the same.

I tried to solve it by generating a random number at the end of the name.

  public string getImageId () {string imageId = ""; Int nb = (int) Math.random (); ImageId = "? Id =" + integer .ststring (nb); Return image iid; }   

Then, I call it on my jsf page

  & lt; H: Graphic image value = "/ images / report.html_files / img_0_0_0 # {MyBean .imageId}" cacheable = "false" / & gt;   

But nothing changes.

Do you have any information about it? Thank you

For my application, I created a Java sublet that gives a different image each time, top to prevent caching with articles cache-Control set and I use the servlet URL in your JSF tags.

I do not think you can dynamically change the image with a URL in a fixed file, like in your example.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -