tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <>
Subject Adding a webapp via the API to a running instance
Date Mon, 20 Jun 2011 15:31:41 GMT
I'm using import org.apache.catalina.startup.Tomcat to embed tomcat.

After it is running, I'm trying to add another webapp with .addWebapp.

The addWebapp call logs:

2011-06-20 11:23:23,385 ["http-bio-9167"-exec-2] INFO
org.apache.catalina.util.LifecycleBase - The start() method was called
on component [Realm[Simple]] after start() had already been called.
The second call will be ignored.
2011-06-20 11:23:23,387 ["http-bio-9167"-exec-2] INFO
org.apache.catalina.startup.ContextConfig - No global web.xml found

This second message is odd, since there is a global web.xml sitting in
the conf subdirectory of the pathname I passed to Tomcat.setBaseDir.

However, this is followed in quick succession by an NPE. In, jspServlet is null. Does it make sense that the
problem is the failure to find the global web.xml, since it would
define the jsp servlet? And, if so, why does this work for my first
webpp (defined before 'start') and not for my second?

	at org.apache.catalina.startup.ContextConfig.convertJsp(
	at org.apache.catalina.startup.ContextConfig.convertJsps(
	at org.apache.catalina.startup.ContextConfig.webConfig(
	at org.apache.catalina.startup.ContextConfig.configureStart(
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
	at org.apache.catalina.core.StandardContext.startInternal(
	at org.apache.catalina.util.LifecycleBase.start(
	at org.apache.catalina.core.ContainerBase.addChildInternal(
	at org.apache.catalina.core.ContainerBase.addChild(
	at org.apache.catalina.core.StandardHost.addChild(
	at org.apache.catalina.startup.Tomcat.addWebapp(
	at org.apache.catalina.startup.Tomcat.addWebapp(
	at org.apache.catalina.startup.Tomcat.addWebapp(

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message