@Override public void setClassLoader(ClassLoader classLoader) { super.setClassLoader(classLoader); String name = getDisplayName(); if (name==null) name=getContextPath(); if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null) ((WebAppClassLoader)classLoader).setName(name); }
@Override public void addFilter(String name, String classname, Map<String, String> parameters) { final String[] USER_FACING_URLS = { "*.html", "*.jsp" }; defineFilter(webAppContext, name, classname, parameters, USER_FACING_URLS); LOG.info("Added filter " + name + " (class=" + classname + ") to context " + webAppContext.getDisplayName()); final String[] ALL_URLS = { "/*" }; for (Map.Entry<ServletContextHandler, Boolean> e : defaultContexts.entrySet()) { if (e.getValue()) { ServletContextHandler handler = e.getKey(); defineFilter(handler, name, classname, parameters, ALL_URLS); LOG.info("Added filter " + name + " (class=" + classname + ") to context " + handler.getDisplayName()); } } filterNames.add(name); }
private void dumpUrl() { Connector[] connectors = getServer().getConnectors(); for (int i=0;i<connectors.length;i++) { String displayName = getDisplayName(); if (displayName == null) displayName = "WebApp@"+Arrays.hashCode(connectors); LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath()); } }
LOG.error( "Error while stopping listener for webapp" + webAppContext.getDisplayName(), e); exception = addMultiException(exception, e); } catch (Exception e) { LOG.error("Error while stopping web app context for webapp " + webAppContext.getDisplayName(), e); exception = addMultiException(exception, e); } catch (Exception e) { LOG.error("Error while stopping web server for webapp " + webAppContext.getDisplayName(), e); exception = addMultiException(exception, e);
@Override public void addFilter(String name, String classname, Map<String, String> parameters) { FilterHolder filterHolder = getFilterHolder(name, classname, parameters); final String[] USER_FACING_URLS = { "*.html", "*.jsp" }; FilterMapping fmap = getFilterMapping(name, USER_FACING_URLS); defineFilter(webAppContext, filterHolder, fmap); LOG.info( "Added filter " + name + " (class=" + classname + ") to context " + webAppContext.getDisplayName()); final String[] ALL_URLS = { "/*" }; fmap = getFilterMapping(name, ALL_URLS); for (Map.Entry<ServletContextHandler, Boolean> e : defaultContexts.entrySet()) { if (e.getValue()) { ServletContextHandler ctx = e.getKey(); defineFilter(ctx, filterHolder, fmap); LOG.info("Added filter " + name + " (class=" + classname + ") to context " + ctx.getDisplayName()); } } filterNames.add(name); }
LOG.error( "Error while stopping listener for webapp" + webAppContext.getDisplayName(), e); exception = addMultiException(exception, e); } catch (Exception e) { LOG.error("Error while stopping web app context for webapp " + webAppContext.getDisplayName(), e); exception = addMultiException(exception, e); } catch (Exception e) { LOG.error("Error while stopping web server for webapp " + webAppContext.getDisplayName(), e); exception = addMultiException(exception, e);
@Override public void setClassLoader(ClassLoader classLoader) { super.setClassLoader(classLoader); // if ( !(classLoader instanceof WebAppClassLoader) ) // { // LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() ); // } if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null) ((WebAppClassLoader)classLoader).setName(getDisplayName()); }
@Override public void setClassLoader(ClassLoader classLoader) { super.setClassLoader(classLoader); // if ( !(classLoader instanceof WebAppClassLoader) ) // { // LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() ); // } if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null) ((WebAppClassLoader)classLoader).setName(getDisplayName()); }
@Override public void setClassLoader(ClassLoader classLoader) { super.setClassLoader(classLoader); // if ( !(classLoader instanceof WebAppClassLoader) ) // { // LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() ); // } if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null) ((WebAppClassLoader)classLoader).setName(getDisplayName()); }
@Override public void setClassLoader(ClassLoader classLoader) { super.setClassLoader(classLoader); // if ( !(classLoader instanceof WebAppClassLoader) ) // { // LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() ); // } if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null) ((WebAppClassLoader)classLoader).setName(getDisplayName()); }
@Override public void setClassLoader(ClassLoader classLoader) { super.setClassLoader(classLoader); // if ( !(classLoader instanceof WebAppClassLoader) ) // { // LOG.info("NOTE: detected a classloader which is not an instance of WebAppClassLoader being set on WebAppContext, some typical class and resource locations may be missing on: " + toString() ); // } if (classLoader!=null && classLoader instanceof WebAppClassLoader && getDisplayName()!=null) ((WebAppClassLoader)classLoader).setName(getDisplayName()); }
private void dumpUrl() { Connector[] connectors = getServer().getConnectors(); for (int i=0;i<connectors.length;i++) { String displayName = getDisplayName(); if (displayName == null) displayName = "WebApp@"+Arrays.hashCode(connectors); LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath()); } }
private void dumpUrl() { Connector[] connectors = getServer().getConnectors(); for (int i=0;i<connectors.length;i++) { String displayName = getDisplayName(); if (displayName == null) displayName = "WebApp@"+connectors.hashCode(); LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath()); } }
private void dumpUrl() { Connector[] connectors = getServer().getConnectors(); for (int i=0;i<connectors.length;i++) { String displayName = getDisplayName(); if (displayName == null) displayName = "WebApp@"+connectors.hashCode(); LOG.info(displayName + " at http://" + connectors[i].toString() + getContextPath()); } }
private void dumpUrl() { Connector[] connectors = getServer().getConnectors(); for (int i=0;i<connectors.length;i++) { String connectorName = connectors[i].getName(); String displayName = getDisplayName(); if (displayName == null) displayName = "WebApp@"+connectors.hashCode(); LOG.info(displayName + " at http://" + connectorName + getContextPath()); } }
private void dumpUrl() { Connector[] connectors = getServer().getConnectors(); for (int i=0;i<connectors.length;i++) { String connectorName = connectors[i].getName(); String displayName = getDisplayName(); if (displayName == null) displayName = "WebApp@"+connectors.hashCode(); LOG.info(displayName + " at http://" + connectorName + getContextPath()); } }
private void dumpUrl() { Connector[] connectors = getServer().getConnectors(); for (int i=0;i<connectors.length;i++) { String connectorName = connectors[i].getName(); String displayName = getDisplayName(); if (displayName == null) displayName = "WebApp@"+connectors.hashCode(); LOG.info(displayName + " at http://" + connectorName + getContextPath()); } }
@Destroy public void destroy() { for (Holder holder : mappings.values()) { try { remove(holder.getContext()); } catch (Fabric3Exception e) { monitor.error("Error removing managed bean for context: " + holder.getContext().getDisplayName(), e); } } }
@Destroy public void destroy() { for (Holder holder : mappings.values()) { try { remove(holder.getContext()); } catch (Fabric3Exception e) { monitor.error("Error removing managed bean for context: " + holder.getContext().getDisplayName(), e); } } }
private void remove(WebAppContext context) { String displayName = context.getDisplayName(); if (displayName == null) { displayName = context.toString(); } String webAppName = encodeName(displayName); managementService.remove(webAppName, "webapps/" + webAppName); ServletHandler handler = context.getServletHandler(); for (ServletHolder servletHolder : handler.getServlets()) { final String group = "webapps/" + webAppName + "/servlets"; managementService.remove(webAppName + "/" + servletHolder.getName(), group); } }