Tabnine Logo
HttpServletRequestBean
Code IndexAdd Tabnine to your IDE (free)

How to use
HttpServletRequestBean
in
org.jboss.weld.module.web

Best Java code snippets using org.jboss.weld.module.web.HttpServletRequestBean (Showing top 6 results out of 315)

origin: weld/core

@Override
protected HttpServletRequest newInstance(InjectionPoint ip, CreationalContext<HttpServletRequest> creationalContext) {
  try {
    Context context = getBeanManager().getContext(RequestScoped.class);
    if (context instanceof HttpRequestContextImpl) {
      return Reflections.<HttpRequestContextImpl> cast(context).getHttpServletRequest();
    }
    throw ServletLogger.LOG.cannotInjectObjectOutsideOfServletRequest(HttpServletRequest.class.getSimpleName(), null);
  } catch (ContextNotActiveException e) {
    throw ServletLogger.LOG.cannotInjectObjectOutsideOfServletRequest(HttpServletRequest.class.getSimpleName(), e);
  }
}
origin: weld/core

  @Override
  public void preBeanRegistration(PreBeanRegistrationContext ctx) {
    if (Reflections.isClassLoadable(ServletApiAbstraction.SERVLET_CONTEXT_CLASS_NAME, WeldClassLoaderResourceLoader.INSTANCE)) {
      ctx.registerBean(new HttpServletRequestBean(ctx.getBeanManager()));
      ctx.registerBean(new HttpSessionBean(ctx.getBeanManager()));
      ctx.registerBean(new ServletContextBean(ctx.getBeanManager()));
    }
  }
}
origin: weld/core

  @Override
  public void preBeanRegistration(PreBeanRegistrationContext ctx) {
    if (Reflections.isClassLoadable(ServletApiAbstraction.SERVLET_CONTEXT_CLASS_NAME, WeldClassLoaderResourceLoader.INSTANCE)) {
      ctx.registerBean(new HttpServletRequestBean(ctx.getBeanManager()));
      ctx.registerBean(new HttpSessionBean(ctx.getBeanManager()));
      ctx.registerBean(new ServletContextBean(ctx.getBeanManager()));
    }
  }
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

@Override
protected HttpServletRequest newInstance(InjectionPoint ip, CreationalContext<HttpServletRequest> creationalContext) {
  try {
    Context context = getBeanManager().getContext(RequestScoped.class);
    if (context instanceof HttpRequestContextImpl) {
      return Reflections.<HttpRequestContextImpl> cast(context).getHttpServletRequest();
    }
    throw ServletLogger.LOG.cannotInjectObjectOutsideOfServletRequest(HttpServletRequest.class.getSimpleName(), null);
  } catch (ContextNotActiveException e) {
    throw ServletLogger.LOG.cannotInjectObjectOutsideOfServletRequest(HttpServletRequest.class.getSimpleName(), e);
  }
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

  @Override
  public void preBeanRegistration(PreBeanRegistrationContext ctx) {
    if (Reflections.isClassLoadable(ServletApiAbstraction.SERVLET_CONTEXT_CLASS_NAME, WeldClassLoaderResourceLoader.INSTANCE)) {
      ctx.registerBean(new HttpServletRequestBean(ctx.getBeanManager()));
      ctx.registerBean(new HttpSessionBean(ctx.getBeanManager()));
      ctx.registerBean(new ServletContextBean(ctx.getBeanManager()));
    }
  }
}
origin: weld/core

@Override
protected HttpServletRequest newInstance(InjectionPoint ip, CreationalContext<HttpServletRequest> creationalContext) {
  try {
    Context context = getBeanManager().getContext(RequestScoped.class);
    if (context instanceof HttpRequestContextImpl) {
      return Reflections.<HttpRequestContextImpl> cast(context).getHttpServletRequest();
    }
    throw ServletLogger.LOG.cannotInjectObjectOutsideOfServletRequest(HttpServletRequest.class.getSimpleName(), null);
  } catch (ContextNotActiveException e) {
    throw ServletLogger.LOG.cannotInjectObjectOutsideOfServletRequest(HttpServletRequest.class.getSimpleName(), e);
  }
}
org.jboss.weld.module.webHttpServletRequestBean

Javadoc

Built-in bean exposing HttpServletRequest.

Most used methods

  • <init>
  • getBeanManager

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JFileChooser (javax.swing)
  • JLabel (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • CodeWhisperer alternatives
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