Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350648

Summary: WABs in Virgo Jetty Server do not automatically get the Bundle-ClassPath: WEB-INF/classes header
Product: [RT] Virgo Reporter: Raman Gupta <rocketraman>
Component: jettyAssignee: Chris Frost <eclipse>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, glyn.normington
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Raman Gupta CLA 2011-06-29 01:07:56 EDT
Build Identifier: 3.0.0.M05

When deploying a war on Tomcat, the war automatically gets the header:

 Bundle-ClassPath: WEB-INF/classes

(as per the documentation).

However, when using the Jetty version of virgo 3.0.0.M05 this header is not automatically added by Virgo, resulting in ClassNotFoundException's. Adding it manually works.

Reproducible: Always
Comment 1 Chris Frost CLA 2011-06-29 06:50:06 EDT
The next milestone of Virgo will not add this header automatically on either Tomcat or Jetty. We have removed this feature to comply with the OSGi web container spec. 

If you still require it for backwards compatibility then the tomcat release only for 3.0 will allow you to switch back to having the headers added. This backwards compatibility will be removed completely sometime after 3.0.

To add them back in for 3.0 on tomcat, modify the 'config/org.eclipse.virgo.web.properties' file to have a property of 'WABHeaders=defaulted' instead of 'strict'. This will be in the next milestone M06
Comment 2 Chris Frost CLA 2011-06-29 07:04:31 EDT
Just to clarify, I assume you are talking about WABs (Web Application Bundles) on Jetty as Virgo Jetty doesn't support War files at all. When a war file is deployed on Virgo Tomcat the 'Bundle-ClassPath: WEB-INF/classes' header will always be added as per the spec for transforming War files in to WABs. Please regard my previous comment as talking about only WABs.
Comment 3 Raman Gupta CLA 2011-06-29 11:23:57 EDT
Yes I was talking about WABs.

OK, sounds good. I thought defaulting that value was a little weird anyway, and I prefer setting it explicitly.