[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-users] problem with webapp deployed as WebAppContext
|
Hi All,
I use jetty embedded in the equinox and the following code in bundle
activator's start method to run my web application:
WebAppContext webAppContext = new WebAppContext();
ShopServlet shopServlet = new ShopServlet(this);
ServletHolder servletHolder = new ServletHolder(shopServlet);
webAppContext
.addServlet(servletHolder, ShopServlet.SERVLET_PATH +
"/*");
Properties settings = new Properties();
settings.put(OSGiWebappConstants.SERVICE_PROP_WAR, "webfiles");
settings.put(OSGiWebappConstants.SERVICE_PROP_CONTEXT_PATH,
SHOP_CONTEXT);
settings.put(OSGiWebappConstants.SERVICE_PROP_DEFAULT_WEB_XML_PATH,
"etc/webdefault.xml");
webappRegistration = bundleContext.registerService(
ContextHandler.class.getName(), webAppContext, settings);
It works fine in the Debug run under IDE. When I export my product and
run it as a standalone equinox app, It fails to retrieve resource files
from webfiles if those resources are located in the subfolders. For
instance, webfiles/css/some.css or webfiles/img/some.png. It succeeds to
return webfiles/main.css though. Would anybody advise on this matter?
--
Best regards,
Ivan Larionov