Example #1
0
 /** @since Jetty 6 */
 static ContextHandler getWebApp(String appName) {
   ContextHandlerCollection server = getConsoleServer();
   if (server == null) return null;
   Handler handlers[] = server.getHandlers();
   if (handlers == null) return null;
   String path = '/' + appName;
   for (int i = 0; i < handlers.length; i++) {
     ContextHandler ch = (ContextHandler) handlers[i];
     if (path.equals(ch.getContextPath())) return ch;
   }
   return null;
 }