On Mar 28, 2011, at 8:06 AM, Thomas Neidhart wrote: > Dear all, > > I am having some troubles with the deployment of an ear that contains a > war with a servlet mapping like that: > > <servlet-mapping> > <servlet-name>default</servlet-name> > <url-pattern>/images/*</url-pattern> > </servlet-mapping> > > The purpose is to let the default servlet serve everything in the images > directory, as there is another servlet that serves the rest: > > <servlet-mapping> > <servlet-name>app</servlet-name> > <url-pattern>/*</url-pattern> > </servlet-mapping> > > While this works pretty well when deploying the war stand-alone, it > fails when deploying it as part of an ear (excerpt): > > org.apache.geronimo.common.DeploymentException: Web app xxx contains a > servlet mapping that refers to servlet 'default' but no such servlet was > found! at > org.apache.geronimo.jetty7.deployment.JettyModuleBuilder.buildServletMappings(JettyModuleBuilder.java:740) > ... > > > It looks like that in the case of an ear, the default servlet is > unknown/unset. Am I missing some dependency to a gbean in the > geronimo-web.xml or geronimo-application.xml? I already tried adding > geronimo.configs.[jetty|jetty-deployer] without success. > > As I could not find anything related to that, my current workaround is > to define the default servlet myself: > > <servlet> > <servlet-name>static</servlet-name> > <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class> > </servlet> > > This only works when using jetty of course, and it would be nice to find > a way to use the default servlet also within an ear.
I don't know our builder code well enough to have a simple answer for you... You must be using Geronimo 2.2.x, correct? It would be interesting to know what happens on a Geronimo 2.2.x Tomcat server assembly. Also, have you tried with Geronimo 2.1.x? --kevan
