@Override public ServletContext getServletContext() { return this.manager.getDeployment().getServletContext(); }
public ServletRequestContext(final Deployment deployment, final HttpServletRequestImpl originalRequest, final HttpServletResponseImpl originalResponse, final ServletPathMatch originalServletPathMatch) { this.deployment = deployment; this.originalRequest = originalRequest; this.originalResponse = originalResponse; this.servletRequest = originalRequest; this.servletResponse = originalResponse; this.originalServletPathMatch = originalServletPathMatch; this.currentServletContext = deployment.getServletContext(); }
@Override public ServletContext getServletContext() { return deployment.getServletContext(); }
@Override public String getPath() { // kakonyii: currrently we use this method at ConvergedSessionDelegate encodeURL() return this.deployment.getServletContext().getContextPath(); //return this.deploymentInfoFacade.getDeploymentInfo().getContextPath(); }
@Override public String getPath() { // kakonyii: currrently we use this method at ConvergedSessionDelegate encodeURL() return this.deployment.getServletContext().getContextPath(); //return this.deploymentInfoFacade.getDeploymentInfo().getContextPath(); }
public ConvergedServletContextImpl getServletContext() { if (context == null) { context = new ConvergedServletContextImpl(deployment.getServletContext()); context.addSipContext(this); } return context; }
@Override public void setMultipartConfig(final MultipartConfigElement multipartConfig) { servletInfo.setMultipartConfig(multipartConfig); managedServlet.setupMultipart(deployment.getServletContext()); }
@Override public ServletContext getContext(final String uripath) { DeploymentManager deploymentByPath = servletContainer.getDeploymentByPath(uripath); if (deploymentByPath == null) { return null; } return deploymentByPath.getDeployment().getServletContext(); }
public ConvergedServletContextImpl getServletContext() { if (context == null) { context = new ConvergedServletContextImpl(deployment.getServletContext()); context.addSipContext(this); } return context; }
@Override public void onDeploymentStart(Deployment dep, Host host) { // Ensure that a deployment HttpHandler cannot overwrite handlers created by camel-undertow checkForOverlappingContextPath(dep); runtimeState.addHttpContext(dep.getServletContext().getContextPath()); }
final ServletContext servletContext = deployment.getServletContext(); return new HttpScope() { @Override
private ApplicationListeners createListeners() { final List<ManagedListener> managedListeners = new ArrayList<>(); for (final ListenerInfo listener : super.getDeployment().getDeploymentInfo().getListeners()) { managedListeners.add(new ManagedListener(listener, false)); } return new ApplicationListeners(managedListeners, super.getDeployment().getServletContext()); }
private ApplicationListeners createListeners() { final List<ManagedListener> managedListeners = new ArrayList<>(); for (final ListenerInfo listener : super.getDeployment().getDeploymentInfo().getListeners()) { managedListeners.add(new ManagedListener(listener, false)); } return new ApplicationListeners(managedListeners, super.getDeployment().getServletContext()); }
@Override public void onDeploymentStop(Deployment dep, Host host) { runtimeState.removeHttpContext(dep.getServletContext().getContextPath()); final DeploymentInfo depInfo = dep.getDeploymentInfo(); if (dep.getHandler() != null) { final String contextPath = depInfo.getContextPath(); existingContextPaths.remove(contextPath); } }
throw UndertowServletMessages.MESSAGES.couldNotFindContextToDispatchTo(requestImpl.getOriginalContextPath()); String toDispatch = requestURI.substring(context.getDeployment().getServletContext().getContextPath().length()); String qs = ((HttpServletRequest) servletRequest).getQueryString(); if (qs != null && !qs.isEmpty()) { toDispatch = toDispatch + "?" + qs; dispatch(context.getDeployment().getServletContext(), toDispatch); toDispatch = toDispatch + "?" + qs; dispatch(context.getDeployment().getServletContext(), toDispatch);
final String contentType = deployment.getServletContext().getMimeType(resource.getName()); if (contentType != null) { resp.setContentType(contentType);
private ServletContext buildServletContext(String contextName) throws ServletException { ServletContainer servletContainer = new ServletContainerImpl(); DeploymentInfo deploymentInfo = new DeploymentInfo(); deploymentInfo.setClassLoader(Thread.currentThread().getContextClassLoader()); deploymentInfo.setDeploymentName("cxf-undertow"); deploymentInfo.setContextPath(contextName); ServletInfo asyncServlet = new ServletInfo(ServletPathMatches.DEFAULT_SERVLET_NAME, CxfUndertowServlet.class); deploymentInfo.addServlet(asyncServlet); servletContainer.addDeployment(deploymentInfo); DeploymentManager deploymentManager = servletContainer.getDeployment(deploymentInfo.getDeploymentName()); deploymentManager.deploy(); deploymentManager.start(); return deploymentManager.getDeployment().getServletContext(); }
private ServletContext buildServletContext(String contextName) throws ServletException { ServletContainer servletContainer = new ServletContainerImpl(); DeploymentInfo deploymentInfo = new DeploymentInfo(); deploymentInfo.setClassLoader(Thread.currentThread().getContextClassLoader()); deploymentInfo.setDeploymentName("cxf-undertow"); deploymentInfo.setContextPath(contextName); ServletInfo asyncServlet = new ServletInfo(ServletPathMatches.DEFAULT_SERVLET_NAME, CxfUndertowServlet.class); deploymentInfo.addServlet(asyncServlet); servletContainer.addDeployment(deploymentInfo); DeploymentManager deploymentManager = servletContainer.getDeployment(deploymentInfo.getDeploymentName()); deploymentManager.deploy(); deploymentManager.start(); return deploymentManager.getDeployment().getServletContext(); }
final String contentType = deployment.getServletContext().getMimeType(resource.getName()); if (contentType != null) { resp.setContentType(contentType);
current = new CachedAuthenticatedSessionHandler(current, super.getDeployment().getServletContext()); List<NotificationReceiver> notificationReceivers = deploymentInfo.getNotificationReceivers(); if (!notificationReceivers.isEmpty()) {