Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Updating an rwt-resource(How to update an rwt-resource on the fly)
Updating an rwt-resource [message #1092021] Thu, 22 August 2013 08:11 Go to next message
John Gymer is currently offline John GymerFriend
Messages: 257
Registered: November 2012
Location: UK
Senior Member
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!
Cheers, John

Just because you can doesn't mean you should
Re: Updating an rwt-resource [message #1097037 is a reply to message #1092021] Thu, 29 August 2013 06:54 Go to previous message
Thomas Kratz is currently offline Thomas KratzFriend
Messages: 165
Registered: July 2009
Senior Member
I would also like to hear about this to reload javascript resources while developing!

[Updated on: Thu, 29 August 2013 06:54]

Report message to a moderator

Previous Topic:Migrate to 1.5 but keep the 1.4 Look
Next Topic:Styling Content Proposal Using CSS
Goto Forum:

Current Time: Thu Jun 21 14:37:50 GMT 2018

Powered by FUDForum. Page generated in 0.01835 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top