Project: Tomcat
Bug 53574 metadata-complete="true" and servlet defined as jsp not working
Reported: 2012-07-20 09:35:23 | Status: resolved fixed

We have a servlet defined as <servlet> <servlet-name>VersionInfoServlet</servlet-name> <jsp-file>/WEB-INF/svnrevision.jsp</jsp-file> </servlet> and mapped as <servlet-mapping> <servlet-name>VersionInfoServlet</servlet-name> <url-pattern>/svnrevision</url-pattern> </servlet-mapping> It worked fine. Then we changed metadata-complete to "true", and from now on we receive INFO: Marking servlet VersionInfoServlet as unavailable lip 20, 2012 11:05:36 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Allocate exception for servlet VersionInfoServlet javax.servlet.ServletException: No servlet class has been specified for servlet VersionInfoServlet at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1130) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:857) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.ajp.AjpNioProcessor.process(AjpNioProcessor.java:184) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)

Files changed in fix:
java/org/apache/catalina/startup/ContextConfig.java test/org/apache/catalina/startup/TestContextConfig.java