Show the start button when a plugin is not running, and the stop button when a plugin is running.

This commit is contained in:
HungryHobo
2010-04-16 03:58:48 +00:00
parent 10d37a9be5
commit ecbc0a2a2d
6 changed files with 99 additions and 5 deletions

View File

@ -87,6 +87,13 @@ public class WebAppStarter {
} catch (IllegalStateException ise) {}
}
static boolean isWebAppRunning(String appName) {
Server server = WebAppStarter.getConsoleServer();
// this will return a new context if one does not exist
HttpContext wac = server.getContext('/' + appName);
return wac.isStarted();
}
/** see comments in ConfigClientsHandler */
static Server getConsoleServer() {
Collection c = Server.getHttpServers();