I\'m displaying images stored in the form of BLOB in MySQL on a
as follows.
hy,
i have the same problem, but my image src is in hardisk not in DB. i have result the problem when i have use a random number but i dont read it. in general i have add a param in src image when this param is a random number.
My solutionis like this:
public class UserPage {
private String fotoCVPath;
//all variabile
private String getRandomImageName() {
int i = (int) (Math.random() * 10000000);
return String.valueOf(i);
}
public void editImage() {
//init the fotoCVPath
fotoCVPath = fotoCVPath + "?tmpVal=" + getRandomImageName();
}
/**
* @return the fotoCVPath
*
* @author - asghaier
*
* Created on 29/mag/2014
*/
public String getFotoCVPath() {
return fotoCVPath;
}
/**
* @param fotoCVPath the fotoCVPath to set
*
* @author- asghaier
*
* Created on 29/mag/2014
*/
public void setFotoCVPath(String fotoCVPath) {
this.fotoCVPath = fotoCVPath;
}
}
and in you my page i have the element graphicImage like this:
and when i like reload the image a update the component panelGrid.
for my example i have use
in
i hope this mode help you for result your problem