@Override public void undeployConfig() { if (this.context != null) { this.context.removeServletMapping("/"); this.tomcatServer.getHost().removeChild(this.context); } }
protected void cleanup() { if (commandServlet != null) { try { context.removeServletMapping(GATEIN_SERVLET_PATH); context.removeChild(commandServlet); } catch (Exception e) { } } }
@Override public Set<String> addMapping(String... urlPatterns) { if (urlPatterns == null) { return Collections.emptySet(); } Set<String> conflicts = new HashSet<String>(); for (String urlPattern : urlPatterns) { String wrapperName = context.findServletMapping(urlPattern); if (wrapperName != null) { Wrapper wrapper = (Wrapper) context.findChild(wrapperName); if (wrapper.isOverridable()) { // Some Wrappers (from global and host web.xml) may be // overridden rather than generating a conflict context.removeServletMapping(urlPattern); } else { conflicts.add(urlPattern); } } } if (!conflicts.isEmpty()) { return conflicts; } for (String urlPattern : urlPatterns) { context.addServletMapping(urlPattern, wrapper.getName()); } return Collections.emptySet(); }
@Override public Set<String> addMapping(String... urlPatterns) { if (urlPatterns == null) { return Collections.emptySet(); } Set<String> conflicts = new HashSet<>(); for (String urlPattern : urlPatterns) { String wrapperName = context.findServletMapping(urlPattern); if (wrapperName != null) { Wrapper wrapper = (Wrapper) context.findChild(wrapperName); if (wrapper.isOverridable()) { // Some Wrappers (from global and host web.xml) may be // overridden rather than generating a conflict context.removeServletMapping(urlPattern); } else { conflicts.add(urlPattern); } } } if (!conflicts.isEmpty()) { return conflicts; } for (String urlPattern : urlPatterns) { context.addServletMapping(urlPattern, wrapper.getName()); } return Collections.emptySet(); }
@Override public Set<String> addMapping(String... urlPatterns) { if (urlPatterns == null) { return Collections.emptySet(); } Set<String> conflicts = new HashSet<String>(); for (String urlPattern : urlPatterns) { String wrapperName = context.findServletMapping(urlPattern); if (wrapperName != null) { Wrapper wrapper = (Wrapper) context.findChild(wrapperName); if (wrapper.isOverridable()) { // Some Wrappers (from global and host web.xml) may be // overridden rather than generating a conflict context.removeServletMapping(urlPattern); } else { conflicts.add(urlPattern); } } } if (!conflicts.isEmpty()) { return conflicts; } for (String urlPattern : urlPatterns) { context.addServletMapping(urlPattern, wrapper.getName()); } return Collections.emptySet(); }
context.removeServletMapping(urlPattern); } else { conflicts.add(urlPattern);
context.removeServletMapping(urlPattern); } else { conflicts.add(urlPattern);
public Set<String> addMapping(String... urlPatterns) { Set<String> conflicts = new HashSet<String>(); if (!((Context) wrapper.getParent()).isStarting()) { throw MESSAGES.cannotAddServletRegistrationAfterInit(((Context) wrapper.getParent()).getPath()); } if (urlPatterns == null || urlPatterns.length == 0) { throw MESSAGES.invalidServletRegistrationArguments(); } for (String urlPattern : urlPatterns) { Context context = ((Context) wrapper.getParent()); String wrapperName = context.findServletMapping(urlPattern); if (wrapperName != null) { Wrapper servletWrapper = (Wrapper) context.findChild(wrapperName); if (servletWrapper.isOverridable()) { // Some Wrappers (from global and host web.xml) may be // overridden rather than generating a conflict context.removeServletMapping(urlPattern); } else { conflicts.add(urlPattern); } } } if (conflicts.isEmpty()) { for (String urlPattern : urlPatterns) { ((Context) wrapper.getParent()).addServletMapping(urlPattern, wrapper.getName()); } } return conflicts; }
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);
context.removeServletMapping(servletMappings[i]);