tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hellman \(KA/EAB\)" <>
Subject Creating and deploying a StandardContex from a Servlet
Date Wed, 04 May 2005 15:31:28 GMT
I've tried asking this question on the tomcat-user list with no success. Since it is related
to the Tomcat API I hope someone here could give me some tips.
What I basically need to do is to create a customized manager webapplication. It will display
all loaded webapplication where the names have a specific prefix. Also, it will be able to
undeploy all of these webapps and then deploy all webapps from a specific path. 
I have a Servlet implementing ContainerServlet. Using this I've manage to retrieve all webapps
from the current Host (myHost.findChildren()). I've also manage to create StandardContext
instances, set the properties I thought were necessary and added them to the Host (myHost.addChild()).
This doesn't work very well however, since the new webapps seem to be deployed but cannot
start. Neither is it possible to remove them through the Manager webapp.
So my question is; what is the proper way for creating a new StandardContext, setting the
right properties, deploy and start it? Right now I'm doing the following:
theContext = new StandardContext();
theContext.setDocBase(myBaseDir + thePath);

I know this list is for development of Tomcat, but I guess this question is close enough.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message