Hi,
 
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.setDisplayName(thePath);
theContext.setDocBase(myBaseDir + thePath);
theContext.setName(thePath);
theContext.setPath(thePath);

myHost.addChild(theContext);
theContext.start();
---
 
I know this list is for development of Tomcat, but I guess this question is 
close enough. :)
 
regards,
Erik

Reply via email to