/** * Gets the application servlets. * * @param context the context * @return the application servlets */ public static List<ServletInfo> getApplicationServlets(Context context) { Container[] cns = context.findChildren(); List<ServletInfo> servlets = new ArrayList<>(cns.length); for (Container container : cns) { if (container instanceof Wrapper) { Wrapper wrapper = (Wrapper) container; servlets.add(getServletInfo(wrapper, context.getName())); } } return servlets; }
long maxTime = 0; for (Container container : context.findChildren()) { if (container instanceof StandardWrapper) { StandardWrapper sw = (StandardWrapper) container;
private boolean isFacesServletPresent(final ServletContext ctx) { if (ctx instanceof ApplicationContextFacade) { try { final ApplicationContext appCtx = (ApplicationContext) get(ApplicationContextFacade.class, ctx); final Context tomcatCtx = (Context) get(ApplicationContext.class, appCtx); if (tomcatCtx instanceof StandardContext) { final Container[] servlets = tomcatCtx.findChildren(); if (servlets != null) { for (final Container s : servlets) { if (s instanceof Wrapper) { if ("javax.faces.webapp.FacesServlet".equals(((Wrapper) s).getServletClass()) || "Faces Servlet".equals(s.getName())) { return true; } } } } } } catch (final Exception e) { // no-op } } return false; }
Class<?> classClass = null; Container[] children = context.findChildren(); for (int i = 0; i < children.length; i++) { if (children[i] instanceof StandardWrapper) {
Class<?> classClass = null; Container[] children = context.findChildren(); for (int i = 0; i < children.length; i++) { if (children[i] instanceof StandardWrapper) {
Class<?> classClass = null; Container[] children = context.findChildren(); for (int i = 0; i < children.length; i++) { if (children[i] instanceof Wrapper) {
Class<?> classClass = null; Container[] children = context.findChildren(); for (int i = 0; i < children.length; i++) { if (children[i] instanceof Wrapper) {
protected void addContext(Context context) { mapper.addContext(context.getParent().getName(), context.getName(), context, context.findWelcomeFiles(), context.getResources()); // Add all wrappers for (Container child : context.findChildren()) { Wrapper wrapper = (Wrapper) child; if (wrapper.getEnabled()) { for (String mapping : wrapper.findMappings()) { boolean jspWildCard = ("jsp".equals(wrapper.getName()) && mapping.endsWith("/*")); mapper.addWrapper(context.getParent().getName(), context.getName(), mapping, wrapper, jspWildCard); } } } }
protected void addContext(Context context) { mapper.addContext(context.getParent().getName(), context.getName(), context, context.findWelcomeFiles(), context.getResources()); // Add all wrappers for (Container child : context.findChildren()) { Wrapper wrapper = (Wrapper) child; if (wrapper.getEnabled()) { for (String mapping : wrapper.findMappings()) { boolean jspWildCard = ("jsp".equals(wrapper.getName()) && mapping.endsWith("/*")); mapper.addWrapper(context.getParent().getName(), context.getName(), mapping, wrapper, jspWildCard); } } } }
Container[] children = context.findChildren(); for (Container child : children) { if (child instanceof Wrapper) {
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Container host = context.getParent(); javax.naming.Context resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, connector)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Host host = (Host)context.getParent(); WebResourceRoot resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, service)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Container host = context.getParent(); javax.naming.Context resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, connector)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Container host = context.getParent(); javax.naming.Context resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, connector)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Container host = context.getParent(); javax.naming.Context resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, connector)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Container host = context.getParent(); javax.naming.Context resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources); for (Container container : context.findChildren()) { registerWrapper((Wrapper) container); } if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, connector)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Host host = (Host)context.getParent(); WebResourceRoot resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); List<WrapperMappingInfo> wrappers = new ArrayList<>(); for (Container container : context.findChildren()) { prepareWrapperMappingInfo(context, (Wrapper) container, wrappers); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerWrapper", container.getName(), contextPath, service)); } } mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources, wrappers); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, service)); } }
/** * Register context. */ private void registerContext(Context context) { String contextPath = context.getPath(); if ("/".equals(contextPath)) { contextPath = ""; } Host host = (Host)context.getParent(); WebResourceRoot resources = context.getResources(); String[] welcomeFiles = context.findWelcomeFiles(); List<WrapperMappingInfo> wrappers = new ArrayList<>(); for (Container container : context.findChildren()) { prepareWrapperMappingInfo(context, (Wrapper) container, wrappers); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerWrapper", container.getName(), contextPath, service)); } } mapper.addContextVersion(host.getName(), host, contextPath, context.getWebappVersion(), context, welcomeFiles, resources, wrappers); if(log.isDebugEnabled()) { log.debug(sm.getString("mapperListener.registerContext", contextPath, service)); } }
Container wrappers[] = context.findChildren(); for (int i = 0; i < wrappers.length; i++) { Wrapper wrapper = (Wrapper) wrappers[i];
Container wrappers[] = context.findChildren(); for (int i = 0; i < wrappers.length; i++) { Wrapper wrapper = (Wrapper) wrappers[i];