if(!jspServlet.getMappings().contains(mapping)) { jspServlet.addMapping(mapping);
@Override public Collection<String> getMappings() { return servletInfo.getMappings(); }
@Override void handle(final ModelNode response, final String name, final MetricsHandler.MetricResult metricResult, final ServletInfo servlet) { for (String mapping : servlet.getMappings()) { response.add(mapping); } }
@Override public ServletContextBuilder addServlet(final ServletInfo servletInfo) { if (servletInfo.getMultipartConfig() == null) servletInfo.setMultipartConfig(defaultMultipartConfig); super.addServlet(servletInfo); if (servletInfo.getMappings() != null) endPoints.addAll(servletInfo.getMappings()); return this; }
@Override public Set<String> tryAddServletMappings(ServletInfo servletInfo, String... urlPatterns) { final Set<String> ret = new HashSet<>(); if(existingUrlPatterns == null) { existingUrlPatterns = new HashSet<>(); for (ServletInfo s : deploymentInfo.getServlets().values()) { if (!s.getName().equals(servletInfo.getName())) { existingUrlPatterns.addAll(s.getMappings()); } } } for (String pattern : urlPatterns) { if (existingUrlPatterns.contains(pattern)) { ret.add(pattern); } } //only update if no changes have been made if (ret.isEmpty()) { for (String pattern : urlPatterns) { existingUrlPatterns.add(pattern); if (!servletInfo.getMappings().contains(pattern)) { servletInfo.addMapping(pattern); } } } getServletPaths().invalidate(); return ret; }
return servletInfo; }) .filter(servletInfo -> ! servletInfo.getMappings().isEmpty()) .collect(Collectors.toList());
ServletInfo servletInfo = convertServletInfo(yggdrasilServletInfo); deployment.addServlet(servletInfo); mappings.addAll(servletInfo.getMappings()); }); di.getWelcomePages().forEach(deployment::addWelcomePage);
final ServletHandler handler = entry.getValue(); for (String path : handler.getManagedServlet().getServletInfo().getMappings()) { if (path.equals("/")) {
.map( si -> si.getName() + " => " + si.getMappings() ) .collect( Collectors.toList() ) ); into.addServlets( servletInfos.values() );
final ServletSecurityInfo securityInfo = servlet.getServletSecurityInfo(); if (securityInfo != null) { final Set<String> mappings = new HashSet<>(servlet.getMappings()); mappings.removeAll(urlPatterns); if (!mappings.isEmpty()) {
for (String url : servletInfo.getMappings()) { if (urlPatterns.contains(url)) { ret.add(url);
final ServletSecurityInfo securityInfo = servlet.getServletSecurityInfo(); if (securityInfo != null) { final Set<String> mappings = new HashSet<>(servlet.getMappings()); mappings.removeAll(urlPatterns); if (!mappings.isEmpty()) {
final ServletSecurityInfo securityInfo = servlet.getServletSecurityInfo(); if (securityInfo != null) { final Set<String> mappings = new HashSet<>(servlet.getMappings()); mappings.removeAll(urlPatterns); if (!mappings.isEmpty()) {
if(!jspServlet.getMappings().contains(mapping)) { jspServlet.addMapping(mapping);
if(!jspServlet.getMappings().contains(mapping)) { jspServlet.addMapping(mapping);