|Updating an rwt-resource [message #1092021]
||Thu, 22 August 2013 08:11
|| John Gymer
Registered: November 2012
Forgive me if this is a nonsense scenario...|
I have a RAP application that uses the PDFBox library to create a PDF file, saves it to a file, then I register the file as an rwt-resource so that I can display it within a Browser control (the PDF has so be available under the same server/port as the owning page for the Browser IFRAME to allow it to be viewable).
This works perfectly the first time.
However, I'd like to be able to modify the same physical PDF file (actually it doesn't have to be a PDF - it could be a web page, or anything else that could be displayed in the browser control), then refresh the rwt-resource so that the Browser control can see the updated copy.
However, this doesn't work... the physical file gets updated ok, and the register of it as an rwt-resource (same name as previous) appears to work ok, but the browser does not see the new PDF. In fact, even if I change the browser to a different URL, then back to the PDF, it doesn't refresh. It is as if the rwt-resource never got updated, and it is still using some cached copy of the resource.
Is this sort of processing possible using RWT/RAP? Have I misunderstood how resources work somehow? Or is it a feature of the browser control doing some sort of caching?
By the way, in some configurations it seems to work correctly - I have it working ok when running the RAP application directly from Eclipse, but not from a standalone OSGi configuration. Another sample app worked ok under one OSGi configuration, but not when copied to another machine. There's obviously something I've missed about the way that I'm supposed to be using the resources.
Any hints and ideas most appreciated!
Just because you can doesn't mean you should
Powered by FUDForum
. Page generated in 0.03176 seconds