|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
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@... For additional commands, e-mail: users-help@... |
|
|
Re: Bundle.findEntries(..) and Bundle.getResource(..)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@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
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 <carl.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@... > For additional commands, e-mail: users-help@... > > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
|
|
|
Re: Bundle.findEntries(..) and Bundle.getResource(..)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" <gnodet@...> To: users@... 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 <carl.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@... > For additional commands, e-mail: users-help@... > > -- Cheers, Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ Open Source SOA http://fusesource.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Bundle.findEntries(..) and Bundle.getResource(..)On 10/15/09 15:55, carl.hall@... wrote:
> I've tried a couple of different settings to the same result. The general layout is below and the full version is available at github [1]. > > Bundle-ClassPath: [iterated list of all jars in WEB-INF/lib/], WEB-INF/classes, [iterated list of all xml files in WEB-INF/] > > [1] http://github.com/thecarlhall/open-experiments/blob/activemq-webconsole/slingtests/osgikernel/bundles/activemq-webconsole/pom.xml > Well, you need to have "." if you expect to find stuff in the bundle JAR file itself. BTW, is that last entry correct for the class path (i.e., list of all XML files)? The bundle class path should not contain resources, just ".", JAR files, or directories. -> richard > > ----- Original Message ----- > From: "Richard S. Hall"<heavy@...> > To: users@... > Sent: Thursday, October 15, 2009 3:39:34 PM GMT -05:00 US/Canada Eastern > Subject: Re: Bundle.findEntries(..) and Bundle.getResource(..) > > 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@... >> For additional commands, e-mail: users-help@... >> >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Bundle.findEntries(..) and Bundle.getResource(..)The missing "." seems to have been my problem. Thanks for pointing that out!
My current Bundle-ClassPath is more like the following now: Bundle-ClassPath: ., WEB-INF/classes, [iterated list of all jars in WEB-INF/lib/] The bit about including all the xml files was a desperate attempt to try to get the files to be seen. ----- Original Message ----- From: "Richard S. Hall" <heavy@...> To: users@... Sent: Thursday, October 15, 2009 3:59:38 PM GMT -05:00 US/Canada Eastern Subject: Re: Bundle.findEntries(..) and Bundle.getResource(..) On 10/15/09 15:55, carl.hall@... wrote: > I've tried a couple of different settings to the same result. The general layout is below and the full version is available at github [1]. > > Bundle-ClassPath: [iterated list of all jars in WEB-INF/lib/], WEB-INF/classes, [iterated list of all xml files in WEB-INF/] > > [1] http://github.com/thecarlhall/open-experiments/blob/activemq-webconsole/slingtests/osgikernel/bundles/activemq-webconsole/pom.xml > Well, you need to have "." if you expect to find stuff in the bundle JAR file itself. BTW, is that last entry correct for the class path (i.e., list of all XML files)? The bundle class path should not contain resources, just ".", JAR files, or directories. -> richard > > ----- Original Message ----- > From: "Richard S. Hall"<heavy@...> > To: users@... > Sent: Thursday, October 15, 2009 3:39:34 PM GMT -05:00 US/Canada Eastern > Subject: Re: Bundle.findEntries(..) and Bundle.getResource(..) > > 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@... >> For additional commands, e-mail: users-help@... >> >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |