"Craig R. McClanahan" wrote:
Roberto Leong wrote:I should expand upon this slightly. If you have an existing Host object and you want to find out what webapps are currently installed within it, simply call host.findChildren(). You will get back an array of Context objects for all the currently active contexts within that host.(there are no methods to retrieve these, only to remove/create) As an additional way to get up to speed, it would be worth your time to examine the source code to the Manager servlet (org.apache.catalina.servlets.ManagerServlet), which is used by the manager webapp installed at context path "/manager" to hot-deploy and hot-undeploy webapps. In particular, the deploy() and undeploy() methods probably do exactly what you need (using a technique different from the embedded approach). This even works on a standard (non-embedded) Tomcat 4.0 install, once you define an appropriate username/password with the role "manager" in your tomcat-users.xml file. Then, you can submit a request like: http://localhost:8080/manager/deploy?path=/myapp&war={war-url} with an appropriate username/password and the app will be hot-deployed onto the same virtual host in which the manager webapp is running. Craig McClanahan
|
- embedded catalina + war files Roberto Leong
- Re: embedded catalina + war files Craig R. McClanahan
- Craig R. McClanahan
