Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Access WEB-INF/classes from within OSGi/Bundle Activator
Access WEB-INF/classes from within OSGi/Bundle Activator [message #637396] Fri, 05 November 2010 11:26 Go to next message
Dirk Bernsau is currently offline Dirk BernsauFriend
Messages: 4
Registered: July 2009
Location: Munich, Germany
Junior Member
Hello,

I'm looking for a convenient way to access the WEB-INF/classes directory of my deployed RAP web-app from within the application (ideally from the bundle activator of my RAP-UI plugin).

Since in a deployment env the bundles are copied to the work location (e.g. work\Catalina\localhost\<web-app>\...) just usign the classloader of my plugin seems not to work.

Is there a method on the RWT class or anything similar?

Getting the actual location of the WEB-INF/classes dir would be OK, also having a classloader that can load resources from there would fork for me.

[Updated on: Fri, 05 November 2010 11:32]

Report message to a moderator

Re: Access WEB-INF/classes from within OSGi/Bundle Activator [message #894695 is a reply to message #637396] Tue, 10 July 2012 07:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

we have the same problem now. We use spring osgi in our RAP plugins. Now
we want to provide a properties file that can be loaded from classpath.
Normally we would place it in WEB-INF/classes and spring reads the
property file with "classpath:custom.properties". This way
a customer can either put the properties file in WEB-INF/classes, or
extend the web applications classpath to an external folde in the
settings of the webapplication (i.e. WebSphere can do this per application).
Is there any solution how we can access the web applications classpath
from within a bundle?

Regards,
Markus

Am 05.11.2010 12:26, schrieb Dirk Bernsau:
> Hello,
>
> I'm looking for a convenient way to access the WEB-INF/classes directory
> of my deployed RAP web-app from within the application (ideally from the
> bundle activator of my RAP-UI plugin).
>
> Since in a deployment env the bundles are copied to the work location
> (e.g. work\Catalina\localhost\<web-app>\...) just usign the classloader
> of my plugin seems not to work.
>
> Is there a method on the RWT class or anything similar?
>
> Getting the actual location of the WEB-INF/classes dir would be OK.
>
Re: Access WEB-INF/classes from within OSGi/Bundle Activator [message #894794 is a reply to message #894695] Tue, 10 July 2012 14:33 Go to previous message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi,

you could check where osgi.instance.area and osgi.configuration.area [1]
point to. I guess the latter is the configuration directory.

Hope this helps,
Ralf


[1]
http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html


--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:Menu contribution issue
Next Topic:Splash Screen
Goto Forum:
  


Current Time: Tue Apr 23 10:22:27 GMT 2024

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

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

Back to the top