3
votes

I have deployed a standard war file as an osgi bundle into equinox using bnd to create a war bundle. Whilst it deploys ok and I can run the app, I cannot see any images or css files. I have deployed catalina-start as an osgi bundle and am using spring-web-extender as the bridge. The image/css files are located at the root of the war file

root
|_images
|_css
|_META-INF
|_WEB-INF

I have seen others deploy images and css files in fragment bundles, but I would have thought this should just work.

Any help appreciated.

1
More information please. What is the error message (if any)? How do you reference the static resources from your Java code?Neil Bartlett
Hi, i just get 404 error when the jsp tries load css, images etc. I works fine though if I deploy using Jetty bundle.Barry

1 Answers

2
votes

As alternative, you can try Eclipse Jetty Web engine 7.x [1] that was redesigned to support OSGi Web Application Bundles (OSGi Enterprise 4.2:128). I use Jetty and do not have any problems with WAR static resources (images, scripts etc.)

[1] - http://eclipse.org/jetty/

Regards, Dmytro