d.addInitParameter(param.getParamName(), param.getParamValue());
public UndertowJaxrsServer deploy(ResteasyDeployment deployment, String contextPath, Map<String, String> contextParams, Map<String, String> initParams) { if (contextPath == null) contextPath = "/"; if (!contextPath.startsWith("/")) contextPath = "/" + contextPath; DeploymentInfo builder = undertowDeployment(deployment); builder.setContextPath(contextPath); builder.setDeploymentName("Resteasy" + contextPath); builder.setClassLoader(deployment.getApplication().getClass().getClassLoader()); if (contextParams != null) { for (Entry<String, String> e : contextParams.entrySet()) { builder.addInitParameter(e.getKey(), e.getValue()); } } if (initParams != null) { ServletInfo servletInfo = builder.getServlets().get("ResteasyServlet"); for (Entry<String, String> e : initParams.entrySet()) { servletInfo.addInitParam(e.getKey(), e.getValue()); } } return deploy(builder); }
@Override public boolean setInitParameter(final String name, final String value) { if(name == null) { throw UndertowServletMessages.MESSAGES.paramCannotBeNullNPE("name"); } if (deploymentInfo.getInitParameters().containsKey(name)) { return false; } deploymentInfo.addInitParameter(name, value); return true; }
protected DeploymentInfo getDeploymentInfo(final String name, final String contextPath, final Map<String, String> initialParameters) { final DeploymentInfo deploymentInfo = new DeploymentInfo(); deploymentInfo.setClassLoader(ParticipantService.class.getClassLoader()); deploymentInfo.setContextPath(contextPath); deploymentInfo.setDeploymentName(name); deploymentInfo.addServlets(getResteasyServlet()); deploymentInfo.addListener(getResteasyListener()); deploymentInfo.addListener(getRestATListener()); for (Entry<String, String> entry : initialParameters.entrySet()) { deploymentInfo.addInitParameter(entry.getKey(), entry.getValue()); } return deploymentInfo; }
public void customize(DeploymentInfo deploymentInfo) { io.undertow.servlet.api.LoginConfig loginConfig = new io.undertow.servlet.api.LoginConfig(keycloakProperties.getRealm()); loginConfig.addFirstAuthMethod("KEYCLOAK"); deploymentInfo.setLoginConfig(loginConfig); deploymentInfo.addInitParameter("keycloak.config.resolver", KeycloakSpringBootConfigResolverWrapper.class.getName()); deploymentInfo.addSecurityConstraints(getSecurityConstraints()); deploymentInfo.addServletExtension(new KeycloakServletExtension()); }
Servlets.deployment().setClassLoader(this.getClass().getClassLoader()).setContextPath(contextPath) .setDeploymentName(deploymentName).addListener(Servlets.listener(org.jboss.weld.environment.servlet.Listener.class)) .addInitParameter(WeldServletLifecycle.class.getPackage().getName() + ".archive.isolation", "false") .addServletContextAttribute(WeldServletLifecycle.BEAN_MANAGER_ATTRIBUTE_NAME, beanManager);
into.addInitParameter( entry.getKey(), entry.getValue() );
di.addInitParameter( KEYCLOAK_CONFIG_FILE_PARAM, config.getKeycloakJson() );
private DeploymentInfo configureDeploymentInfo() { DeploymentInfo deploymentInfo = Servlets.deployment() .setEagerFilterInit(true) .setClassLoader(mostCompleteClassLoader) .setDeploymentName(applicationConfig.getId()) .setDisplayName(applicationConfig.getName()) .setDefaultSessionTimeout(serverConfig.sessions().getTimeout()) .addServletContextAttribute( WebSocketDeploymentInfo.ATTRIBUTE_NAME, new WebSocketDeploymentInfo() .setBuffers(new DefaultByteBufferPool( undertowConfig.isDirectBuffers(), undertowConfig.getBufferSize())) .setWorker(xnioWorker) ) .setContextPath(serverConfig.getContextPath()); for (Map.Entry<String, String> initParameter : initParameters.entrySet()) { deploymentInfo.addInitParameter(initParameter.getKey(), initParameter.getValue()); } for (ServletContainerInitializer servletContainerInitializer : loadServletContainerInitializers()) { deploymentInfo.addServletContainerInitalizer( createServletContainerInitializerInfo(servletContainerInitializer)); } return deploymentInfo; }
builder.addInitParameter("c.g.wuic.facade.contextPath", WUIC_SERVLET_PATH);
info.addInitParameter(en.getKey(), en.getValue());
info.addInitParameter(en.getKey(), en.getValue());
d.addInitParameter(param.getParamName(), param.getParamValue());
d.addInitParameter(param.getParamName(), param.getParamValue());