Home » Eclipse Projects » Remote Application Platform (RAP) » Browser caching and org.eclipse.equinox.http.registry.resources
|
Re: Browser caching and org.eclipse.equinox.http.registry.resources [message #548579 is a reply to message #548551] |
Thu, 22 July 2010 11:45 |
Stefan 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 |
Philipp Leusmann 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 |
Stefan 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
>
|
|
|
Goto Forum:
Current Time: Thu Dec 26 20:52:26 GMT 2024
Powered by FUDForum. Page generated in 0.04130 seconds
|