External image

Hello

How can i add image from external resource not from war but example from : /usr/local/resource/logo.png ??

Just use a
FileResource

I Dont understand
because vaadin magicaly cached image

here is my code :


File file = new File("/usr/local/shop-storage/image/logo/logo.gif");
	FileResource fResource = new FileResource(file,getMainWindow().getApplication());
			Embedded embedded = new Embedded("SUPER", fResource);
			
			bodyLayout.addComponent(embedded,0,2, Alignment.MIDDLE_CENTER);

And its problem because when i change image in this location /usr/local/shop-storage/image/logo/ , clear browser cache and redeploy application
nothing happend i have got first image ??

its not problem with browser because i try few time redeploy and clear project and i have got the same result .
So vaddin must cached this image in war ?? its very strange because if i delete this image and redeploy i have not got any picture and its ok.
But if i paste new gif into logo folder i have got
first
image ??

I need solution like that:
when i change image in storage ant
not
reedeploy application so image change in browser but its not working like that :confused:

so plz any solution form my problem ?

Hi,

Did you try to use
setCachetime()
method of FileResource?


sasha