ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | oscar List | April 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [oscar] Get a ressource from another bundle

I don't think that this is the issue, because that is why bundle: URLs are a security hole, because you can access things inside of other bundles that maybe you shouldn't have access.

My initial reaction was that perhaps the URL was trying to be used after converting to a string and then back to a URL. Could we see the code snippet of how the URL is being retrieved and accessed?

-> richard

Rob Walker wrote:


What could be the problem is that resources access from other bundles uses the same rules as classes i.e. to access a resource from another bundle, you'll need a pair of Export-Package and Import-Package headers for the package dir of the resource.


-- Rob

Brahim Ait elhaj wrote:

I'd like to get the url of an xml file situated in a bundle from another one. I use context.getBundle().getResource(XML_FILE) the returned url seems like this : bundle://14.0/pitask.xml (which is correct) but when i use this url from the other bundle to get this resource i have a null pointer exception. Why ? Shoud i use getResourceAsStream() method ? I tried returning a file object and got the same problem

Thanks to help me !


You receive this message as a subscriber of the oscar@xxxxxxxxxxxxx mailing 
To unsubscribe: mailto:oscar-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Ascert - Taking systems to the Edge
+44 (0)20 7488 3470

<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.