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.
Any help would be welcome!
Thanks Thomas
--
Thomas Neidhart, Software Engineer
Space Applications Services, www.spaceapplications.com
Leuvensesteenweg 325, B-1932 Zaventem, Belgium
Phone: +32-(0)2-721.54.84, Fax: +32-(0)2-721.54.44