You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "Carl F. Hall" <ca...@et.gatech.edu> on 2009/10/15 18:22:40 UTC

Bundle.findEntries(..) and Bundle.getResource(..)

I have a WAR file that is being deployed as an OSGi bundle.  Namely, I'm wrapping the ActiveMQ web console WAR to be deployed as part of my build.  The bundle installs and I can walk through the activator until sitemesh tries to find /WEB-INF/decorators.xml which it can't.  I've tried a few things and have discovered the following:

// these were tested in the activator
bundle.getResource("/WEB-INF/decorators.xml");   // returns null; this is what sitemesh looks for.
bundle.getResource("/decorators.xml");  // returns proper URL (bundle://110.0:1/decorators.xml)
bundle.findEntries("WEB-INF", "decorators.xml", false);   // iterating the enumeration shows "bundle://110.0:0/WEB-INF/decorators.xml"

Is there a way to get resources in /WEB-INF of the WAR to be retrievable through getResource(..) at their /WEB-INF/<file> address?  I can't modify the sitemesh code, so I'd like to map the resources or discover what I'm doing wrong.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle.findEntries(..) and Bundle.getResource(..)

Posted by "Richard S. Hall" <he...@ungoverned.org>.
What are you setting your Bundle-ClassPath to for this bundle?

-> richard

On 10/15/09 12:22, Carl F. Hall wrote:
> I have a WAR file that is being deployed as an OSGi bundle.  Namely, I'm wrapping the ActiveMQ web console WAR to be deployed as part of my build.  The bundle installs and I can walk through the activator until sitemesh tries to find /WEB-INF/decorators.xml which it can't.  I've tried a few things and have discovered the following:
>
> // these were tested in the activator
> bundle.getResource("/WEB-INF/decorators.xml");   // returns null; this is what sitemesh looks for.
> bundle.getResource("/decorators.xml");  // returns proper URL (bundle://110.0:1/decorators.xml)
> bundle.findEntries("WEB-INF", "decorators.xml", false);   // iterating the enumeration shows "bundle://110.0:0/WEB-INF/decorators.xml"
>
> Is there a way to get resources in /WEB-INF of the WAR to be retrievable through getResource(..) at their /WEB-INF/<file>  address?  I can't modify the sitemesh code, so I'd like to map the resources or discover what I'm doing wrong.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>    

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle.findEntries(..) and Bundle.getResource(..)

Posted by "Carl F. Hall" <ca...@et.gatech.edu>.
I have tried installing the app via pax-runner and that didn't give me any errors, however I would like to send this out as part of our build process and not installed after the build.  Am I missing something in the pax tools that could make this happen?


----- Original Message -----
From: "Guillaume Nodet" <gn...@gmail.com>
To: users@felix.apache.org
Sent: Thursday, October 15, 2009 3:51:51 PM GMT -05:00 US/Canada Eastern
Subject: Re: Bundle.findEntries(..) and Bundle.getResource(..)

Have you tried using pax-web and the pax-web-url handler to directly
install the web app ?

On Thu, Oct 15, 2009 at 18:22, Carl F. Hall <ca...@et.gatech.edu> wrote:
> I have a WAR file that is being deployed as an OSGi bundle.  Namely, I'm wrapping the ActiveMQ web console WAR to be deployed as part of my build.  The bundle installs and I can walk through the activator until sitemesh tries to find /WEB-INF/decorators.xml which it can't.  I've tried a few things and have discovered the following:
>
> // these were tested in the activator
> bundle.getResource("/WEB-INF/decorators.xml");   // returns null; this is what sitemesh looks for.
> bundle.getResource("/decorators.xml");  // returns proper URL (bundle://110.0:1/decorators.xml)
> bundle.findEntries("WEB-INF", "decorators.xml", false);   // iterating the enumeration shows "bundle://110.0:0/WEB-INF/decorators.xml"
>
> Is there a way to get resources in /WEB-INF of the WAR to be retrievable through getResource(..) at their /WEB-INF/<file> address?  I can't modify the sitemesh code, so I'd like to map the resources or discover what I'm doing wrong.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Bundle.findEntries(..) and Bundle.getResource(..)

Posted by Guillaume Nodet <gn...@gmail.com>.
Have you tried using pax-web and the pax-web-url handler to directly
install the web app ?

On Thu, Oct 15, 2009 at 18:22, Carl F. Hall <ca...@et.gatech.edu> wrote:
> I have a WAR file that is being deployed as an OSGi bundle.  Namely, I'm wrapping the ActiveMQ web console WAR to be deployed as part of my build.  The bundle installs and I can walk through the activator until sitemesh tries to find /WEB-INF/decorators.xml which it can't.  I've tried a few things and have discovered the following:
>
> // these were tested in the activator
> bundle.getResource("/WEB-INF/decorators.xml");   // returns null; this is what sitemesh looks for.
> bundle.getResource("/decorators.xml");  // returns proper URL (bundle://110.0:1/decorators.xml)
> bundle.findEntries("WEB-INF", "decorators.xml", false);   // iterating the enumeration shows "bundle://110.0:0/WEB-INF/decorators.xml"
>
> Is there a way to get resources in /WEB-INF of the WAR to be retrievable through getResource(..) at their /WEB-INF/<file> address?  I can't modify the sitemesh code, so I'd like to map the resources or discover what I'm doing wrong.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org