Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Browser caching and org.eclipse.equinox.http.registry.resources
Browser caching and org.eclipse.equinox.http.registry.resources [message #548551] Thu, 22 July 2010 10:34 Go to next message
Philipp Leusmann is currently offline Philipp LeusmannFriend
Messages: 36
Registered: July 2009
Member
Hi,

during development, I noticed I had to turn off browser caching to be
sure to always get fresh resources delivered via the
org.eclipse.equinox.http.registry.resources mechanism.

Is there any special treatment for this for productions use? Like, if
the bundle has a newer version, resources are always redelivered?
How does this work?

Regards,
Philipp
Re: Browser caching and org.eclipse.equinox.http.registry.resources [message #548579 is a reply to message #548551] Thu, 22 July 2010 11:45 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Philipp,

I see at least two possibilities:
1. Deploy a new version of your app behind a new url (e.g. webapp name
"MyFancyApp2.0")

2. Use a version-dependend string when registering resources. This can
be easily achieved if you don't use the resources-extension point but
register the resources programmatically with
org.osgi.service.http.HttpService.registerResources(String, String,
HttpContext), e.g. in the bundle's activator.

Regards,
Stefan.

Philipp Leusmann schrieb:
> Hi,
>
> during development, I noticed I had to turn off browser caching to be
> sure to always get fresh resources delivered via the
> org.eclipse.equinox.http.registry.resources mechanism.
>
> Is there any special treatment for this for productions use? Like, if
> the bundle has a newer version, resources are always redelivered?
> How does this work?
>
> Regards,
> Philipp
Re: Browser caching and org.eclipse.equinox.http.registry.resources [message #548724 is a reply to message #548579] Thu, 22 July 2010 17:54 Go to previous messageGo to next message
Philipp Leusmann is currently offline Philipp LeusmannFriend
Messages: 36
Registered: July 2009
Member
Hi Stefan,

isn't this problem to general, to be handled individually. I am really
stunned, I have to avoid caching myself.

Nevertheless, how can I access HttpService in the Activator? I do not
even find the class in the bundles delivered with RAP.

Regards,
Philipp

Am 22.07.10 13:45, schrieb Stefan Roeck:
> Hi Philipp,
>
> I see at least two possibilities:
> 1. Deploy a new version of your app behind a new url (e.g. webapp name
> "MyFancyApp2.0")
>
> 2. Use a version-dependend string when registering resources. This can
> be easily achieved if you don't use the resources-extension point but
> register the resources programmatically with
> org.osgi.service.http.HttpService.registerResources(String, String,
> HttpContext), e.g. in the bundle's activator.
>
> Regards,
> Stefan.
>
> Philipp Leusmann schrieb:
>> Hi,
>>
>> during development, I noticed I had to turn off browser caching to be
>> sure to always get fresh resources delivered via the
>> org.eclipse.equinox.http.registry.resources mechanism.
>>
>> Is there any special treatment for this for productions use? Like, if
>> the bundle has a newer version, resources are always redelivered?
>> How does this work?
>>
>> Regards,
>> Philipp
Re: Browser caching and org.eclipse.equinox.http.registry.resources [message #548802 is a reply to message #548724] Fri, 23 July 2010 06:37 Go to previous message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Philipp,

yes, it's a general problem and my first proposal is a general solution
for that :-)

To your question: HttpService is an OSGi service. You can acquire it
programtically, as declarative service, etc.

See Lars Vogel's excellent tutorial for an example:
http://www.vogella.de/articles/OSGi/article.html#desconsumer

Regards,
Stefan.

Philipp Leusmann schrieb:
> Hi Stefan,
>
> isn't this problem to general, to be handled individually. I am really
> stunned, I have to avoid caching myself.
>
> Nevertheless, how can I access HttpService in the Activator? I do not
> even find the class in the bundles delivered with RAP.
>
> Regards,
> Philipp
>
Previous Topic:RAP 1.3 and XHTML
Next Topic:RAP & SMARTPHONES
Goto Forum:
  


Current Time: Thu Apr 25 15:42:02 GMT 2024

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

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

Back to the top