Tabnine Logo
CurrentThreadToServletContext.getServletContextForCurrentClassLoader
Code IndexAdd Tabnine to your IDE (free)

How to use
getServletContextForCurrentClassLoader
method
in
javax.faces.CurrentThreadToServletContext

Best Java code snippets using javax.faces.CurrentThreadToServletContext.getServletContextForCurrentClassLoader (Showing top 8 results out of 315)

origin: javax/javaee-web-api

@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException {
  FacesContext result = null;
  if (null != initContextServletContextMap && !initContextServletContextMap.isEmpty()) {
    ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader();
    if (null != servletContext) {
      for (Map.Entry<FacesContext, ServletContext> entry : initContextServletContextMap.entrySet()) {
        if (servletContext.equals(entry.getValue())) {
          result = entry.getKey();
          break;
        }
      }
    }
  }
    
  return result;
}

origin: com.sun.faces/jsf-api

@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException {
  FacesContext result = null;
  if (null != initContextServletContextMap && !initContextServletContextMap.isEmpty()) {
    ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader();
    if (null != servletContext) {
      for (Map.Entry<FacesContext, ServletContext> entry : initContextServletContextMap.entrySet()) {
        if (servletContext.equals(entry.getValue())) {
          result = entry.getKey();
          break;
        }
      }
    }
  }
    
  return result;
}

origin: javax.faces/javax.faces-api

@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException {
  FacesContext result = null;
  if (null != initContextServletContextMap && !initContextServletContextMap.isEmpty()) {
    ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader();
    if (null != servletContext) {
      for (Map.Entry<FacesContext, ServletContext> entry : initContextServletContextMap.entrySet()) {
        if (servletContext.equals(entry.getValue())) {
          result = entry.getKey();
          break;
        }
      }
    }
  }
    
  return result;
}

origin: jboss/jboss-javaee-specs

@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException {
  FacesContext result = null;
  if (null != initContextServletContextMap && !initContextServletContextMap.isEmpty()) {
    ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader();
    if (null != servletContext) {
      for (Map.Entry<FacesContext, ServletContext> entry : initContextServletContextMap.entrySet()) {
        if (servletContext.equals(entry.getValue())) {
          result = entry.getKey();
          break;
        }
      }
    }
  }
    
  return result;
}

origin: org.glassfish/javax.faces

/**
 * Consult the initContextServletContextMap (reflectively obtained from the FacesContext in our
 * ctor). If it is non-empty, obtain the ServletContext corresponding to the current Thread's
 * context ClassLoader. If found, use the initContextServletContextMap to find the FacesContext
 * corresponding to that ServletContext.
 */
@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException {
  FacesContext result = null;
  
  if (initContextServletContextMap != null && !initContextServletContextMap.isEmpty()) {
    
    // Obtain the ServletContext corresponding to the current Thread's context ClassLoader
    ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader();
    
    if (servletContext != null) {
      
      // ServletContext found. Use the initContextServletContextMap to find the FacesContext corresponding 
      // to this ServletContext.
      
      for (Entry<FacesContext, ServletContext> entry : initContextServletContextMap.entrySet()) {
        if (servletContext.equals(entry.getValue())) {
          result = entry.getKey();
          break;
        }
      }
    }
  }
  return result;
}
origin: eclipse-ee4j/mojarra

/**
 * Consult the initContextServletContextMap (reflectively obtained from the FacesContext in our
 * ctor). If it is non-empty, obtain the ServletContext corresponding to the current Thread's
 * context ClassLoader. If found, use the initContextServletContextMap to find the FacesContext
 * corresponding to that ServletContext.
 */
@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException {
  FacesContext result = null;
  
  if (initContextServletContextMap != null && !initContextServletContextMap.isEmpty()) {
    
    // Obtain the ServletContext corresponding to the current Thread's context ClassLoader
    ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader();
    
    if (servletContext != null) {
      
      // ServletContext found. Use the initContextServletContextMap to find the FacesContext corresponding 
      // to this ServletContext.
      
      for (Entry<FacesContext, ServletContext> entry : initContextServletContextMap.entrySet()) {
        if (servletContext.equals(entry.getValue())) {
          result = entry.getKey();
          break;
        }
      }
    }
  }
  return result;
}
origin: org.glassfish/jakarta.faces

/**
 * Consult the initContextServletContextMap (reflectively obtained from the FacesContext in our
 * ctor). If it is non-empty, obtain the ServletContext corresponding to the current Thread's
 * context ClassLoader. If found, use the initContextServletContextMap to find the FacesContext
 * corresponding to that ServletContext.
 */
@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException {
  FacesContext result = null;
  
  if (initContextServletContextMap != null && !initContextServletContextMap.isEmpty()) {
    
    // Obtain the ServletContext corresponding to the current Thread's context ClassLoader
    ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader();
    
    if (servletContext != null) {
      
      // ServletContext found. Use the initContextServletContextMap to find the FacesContext corresponding 
      // to this ServletContext.
      
      for (Entry<FacesContext, ServletContext> entry : initContextServletContextMap.entrySet()) {
        if (servletContext.equals(entry.getValue())) {
          result = entry.getKey();
          break;
        }
      }
    }
  }
  return result;
}
origin: eclipse-ee4j/mojarra

/**
 * Consult the initContextServletContextMap (reflectively obtained from the FacesContext in our
 * ctor). If it is non-empty, obtain the ServletContext corresponding to the current Thread's
 * context ClassLoader. If found, use the initContextServletContextMap to find the FacesContext
 * corresponding to that ServletContext.
 */
@Override
public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) throws FacesException {
  FacesContext result = null;
  
  if (initContextServletContextMap != null && !initContextServletContextMap.isEmpty()) {
    
    // Obtain the ServletContext corresponding to the current Thread's context ClassLoader
    ServletContext servletContext = (ServletContext) FactoryFinder.FACTORIES_CACHE.getServletContextForCurrentClassLoader();
    
    if (servletContext != null) {
      
      // ServletContext found. Use the initContextServletContextMap to find the FacesContext corresponding 
      // to this ServletContext.
      
      for (Entry<FacesContext, ServletContext> entry : initContextServletContextMap.entrySet()) {
        if (servletContext.equals(entry.getValue())) {
          result = entry.getKey();
          break;
        }
      }
    }
  }
  return result;
}
javax.facesCurrentThreadToServletContextgetServletContextForCurrentClassLoader

Javadoc

Uses the FactoryManagerCacheKey system to find the ServletContext associated with the current ClassLoader, if any.

Popular methods of CurrentThreadToServletContext

  • detectSpecialInitializationCase
    This method is used to detect the following special initialization case. IF no FactoryFinderInstance
  • getFallbackFactory
  • resetSpecialInitializationCaseFlags
  • getApplicationFactoryManager
  • getClassLoader
    Identify and return the class loader that is associated with the calling web application.
  • removeApplicationFactoryManager
  • getFactoryFinder
  • removeFactoryFinder

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ImageIO (javax.imageio)
  • Notification (javax.management)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now