public void setRunAs (ServletHolder holder) { if (holder == null) return; String className = holder.getClassName(); if (className.equals(_className)) { //Only set the RunAs if it has not already been set, presumably by web/web-fragment.xml if (holder.getRegistration().getRunAsRole() == null) holder.getRegistration().setRunAsRole(_roleName); } } }
protected ServletRegistration.Dynamic addServlet(ServletContext servletContext, ServletInfo servletInfo) { ServletRegistration.Dynamic servletRegistration = servletContext.addServlet(servletInfo.servletName, servletInfo.servletClass); servletRegistration.setInitParameters(servletInfo.initParams); servletRegistration.setAsyncSupported(servletInfo.asyncSupported); if (servletInfo.loadOnStartup != null) { servletRegistration.setLoadOnStartup(servletInfo.loadOnStartup); } if (servletInfo.multipartConfigInfo != null) { servletRegistration.setMultipartConfig(new MultipartConfigElement(servletInfo.multipartConfigInfo.location, servletInfo.multipartConfigInfo.maxFileSize, servletInfo.multipartConfigInfo.maxRequestSize, servletInfo.multipartConfigInfo.fileSizeThreshold)); } servletRegistration.setRunAsRole(servletInfo.runAsRole); // servletRegistration.setServletSecurity(); servletRegistration.addMapping(servletInfo.servletMappings.toArray(new String[servletInfo.servletMappings.size()])); return servletRegistration; } }
public void setRunAs (ServletHolder holder) throws ServletException { if (holder == null) return; String className = holder.getClassName(); if (className.equals(_className)) { //Only set the RunAs if it has not already been set, presumably by web/web-fragment.xml if (holder.getRegistration().getRunAsRole() == null) holder.getRegistration().setRunAsRole(_roleName); } } }
public void setRunAs (ServletHolder holder) throws ServletException { if (holder == null) return; String className = holder.getClassName(); if (className.equals(_className)) { //Only set the RunAs if it has not already been set, presumably by web/web-fragment.xml if (holder.getRegistration().getRunAsRole() == null) holder.getRegistration().setRunAsRole(_roleName); } } }
public void setRunAs (ServletHolder holder) throws ServletException { if (holder == null) return; String className = holder.getClassName(); if (className.equals(_className)) { //Only set the RunAs if it has not already been set, presumably by web/web-fragment.xml if (holder.getRegistration().getRunAsRole() == null) holder.getRegistration().setRunAsRole(_roleName); } } }
public void setRunAs (ServletHolder holder) throws ServletException { if (holder == null) return; String className = holder.getClassName(); if (className.equals(_className)) { //Only set the RunAs if it has not already been set, presumably by web/web-fragment.xml if (holder.getRegistration().getRunAsRole() == null) holder.getRegistration().setRunAsRole(_roleName); } } }
@Override protected void customizeRegistration(ServletRegistration.Dynamic registration) { registration.setRunAsRole("role"); }
@Override protected void customizeRegistration(ServletRegistration.Dynamic registration) { registration.setRunAsRole("role"); }