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:29:28 UTC

getResource & findEntries give different URLs

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