|
Re: Serving static content with RAP-application [message #541690 is a reply to message #541586] |
Tue, 22 June 2010 08:20 |
|
Do you mean somting like this:
http://wiki.eclipse.org/RAP/FAQ#How_do_I_add_an_applet_.2F_f lash_.2F_an_existing_Javascript_libary
Or do you mean you want to add it to the WAR file if so you can do that just by puting them in the template folder of the root of your war file.
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
|
|
Re: Serving static content with RAP-application [message #541706 is a reply to message #541695] |
Tue, 22 June 2010 09:23 |
Benjamin Wolff Messages: 136 Registered: July 2009 |
Senior Member |
|
|
Hi, don't worry, it is as easy as putting it into a folder. But you have to register these ressources with an extension point. Then you can access these files like <url>/bla/script.js
I don't know if this fits your use-case. However, you should search this newsgroup for 'register resources' oder 'static content', i think there's also a FAQ entry.
HTH,
Ben
Am 22.06.2010 10:29, schrieb Philipp Leusmann:
> Actually I was hoping for something a little more easy like putting it
> into a folder and then it's accessible by some URL. But probably we'll
> have to go the widget-way, then.
>
> Regards,
> Philipp
>
> Am 22.06.10 10:20, schrieb Martijn Cremer:
>> Do you mean somting like this:
>>
>> http://wiki.eclipse.org/RAP/FAQ#How_do_I_add_an_applet_.2F_f
>> lash_.2F_an_existing_Javascript_libary
>>
>> Or do you mean you want to add it to the WAR file if so you can do that
>> just by puting them in the template folder of the root of your war file.
>
|
|
|
Re: Serving static content with RAP-application [message #541723 is a reply to message #541706] |
Tue, 22 June 2010 10:18 |
|
Hi Philipp,
you can also register a whole directory as a resource using the
extension point org.eclipse.equinox.http.registry.resources.
Just add an extension like this to your plug-in (not sure about the
trailing slashes, try it out):
<extension
point="org.eclipse.equinox.http.registry.resources">
<resource
alias="/your-base-url/"
base-name="/your-directory/">
</resource>
</extension>
Regards, Ralf
Benjamin Wolff wrote:
> Hi, don't worry, it is as easy as putting it into a folder. But you have
> to register these ressources with an extension point. Then you can
> access these files like <url>/bla/script.js
> I don't know if this fits your use-case. However, you should search this
> newsgroup for 'register resources' oder 'static content', i think
> there's also a FAQ entry.
>
> HTH,
> Ben
>
> Am 22.06.2010 10:29, schrieb Philipp Leusmann:
>> Actually I was hoping for something a little more easy like putting it
>> into a folder and then it's accessible by some URL. But probably we'll
>> have to go the widget-way, then.
>>
>> Regards,
>> Philipp
>>
>> Am 22.06.10 10:20, schrieb Martijn Cremer:
>>> Do you mean somting like this:
>>>
>>> http://wiki.eclipse.org/RAP/FAQ#How_do_I_add_an_applet_.2F_f
>>> lash_.2F_an_existing_Javascript_libary
>>>
>>> Or do you mean you want to add it to the WAR file if so you can do that
>>> just by puting them in the template folder of the root of your war file.
>>
|
|
|
Re: Serving static content with RAP-application [message #541735 is a reply to message #541723] |
Tue, 22 June 2010 11:42 |
Philipp Leusmann Messages: 36 Registered: July 2009 |
Member |
|
|
Ralf,
that was the response I was hoping for. Looks great.
Thanks,
Philipp
Am 22.06.10 12:18, schrieb Ralf Sternberg:
> Hi Philipp,
>
> you can also register a whole directory as a resource using the
> extension point org.eclipse.equinox.http.registry.resources.
>
> Just add an extension like this to your plug-in (not sure about the
> trailing slashes, try it out):
>
> <extension
> point="org.eclipse.equinox.http.registry.resources">
> <resource
> alias="/your-base-url/"
> base-name="/your-directory/">
> </resource>
> </extension>
>
> Regards, Ralf
>
> Benjamin Wolff wrote:
>> Hi, don't worry, it is as easy as putting it into a folder. But you have
>> to register these ressources with an extension point. Then you can
>> access these files like<url>/bla/script.js
>> I don't know if this fits your use-case. However, you should search this
>> newsgroup for 'register resources' oder 'static content', i think
>> there's also a FAQ entry.
>>
>> HTH,
>> Ben
>>
>> Am 22.06.2010 10:29, schrieb Philipp Leusmann:
>>> Actually I was hoping for something a little more easy like putting it
>>> into a folder and then it's accessible by some URL. But probably we'll
>>> have to go the widget-way, then.
>>>
>>> Regards,
>>> Philipp
>>>
>>> Am 22.06.10 10:20, schrieb Martijn Cremer:
>>>> Do you mean somting like this:
>>>>
>>>> http://wiki.eclipse.org/RAP/FAQ#How_do_I_add_an_applet_.2F_f
>>>> lash_.2F_an_existing_Javascript_libary
>>>>
>>>> Or do you mean you want to add it to the WAR file if so you can do that
>>>> just by puting them in the template folder of the root of your war file.
>>>
|
|
|
Powered by
FUDForum. Page generated in 0.03657 seconds