I have spring application which uses embedded Jetty instance.
project
| src
| controller
| webapps
| jsp
| WEB-INF
Probably a little bit out-dated. However I recently encountered this problem in the context of embedding Jetty in an Eclipse OSGi application using the version of Jetty packaged with Eclipse (Jetty 8.x).
The way I sorted this out is the following :
Bundle bundle = FrameworkUtil.getBundle(WebAppContext.class);
Enumeration urls = bundle.findEntries("/", "webdefault.xml", true);
String webdefaultURL = urls.nextElement().toExternalForm(); // Should check returned value
mycontext.setDefaultsDescriptor(webdefaultURL);
Hope it helps
seb