Codota Logo
SessionHolder.getSessionIfExists
Code IndexAdd Codota to your IDE (free)

How to use
getSessionIfExists
method
in
org.jboss.weld.servlet.SessionHolder

Best Java code snippets using org.jboss.weld.servlet.SessionHolder.getSessionIfExists (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.jboss.weld.se/weld-se

/**
 * Get the session, create equals false;
 * @return http session or null if no such session exists
 */
protected HttpSession getSessionIfExists() {
  return SessionHolder.getSessionIfExists();
}
origin: org.jboss.weld.se/weld-se

@Override
protected void setSessionAttribute(HttpServletRequest request, String name, Object value, boolean create) {
  if (create || SessionHolder.getSessionIfExists() != null) {
    getSessionFromRequest(request, true).setAttribute(name, value);
  }
}
origin: org.jboss.weld.se/weld-se

@Override
protected Object getSessionAttribute(HttpServletRequest request, String name, boolean create) {
  if (create || SessionHolder.getSessionIfExists() != null) {
    return getSessionFromRequest(request, true).getAttribute(name);
  } else {
    return null;
  }
}
origin: org.jboss.weld.se/weld-se

private HttpSession obtainHttpSession() {
  HttpSession session = SessionHolder.getSessionIfExists();
  if (session == null) {
    throw ServletLogger.LOG.cannotInjectObjectOutsideOfServletRequest(HttpSession.class.getSimpleName(), null);
  }
  return session;
}
org.jboss.weld.servletSessionHoldergetSessionIfExists

Popular methods of SessionHolder

  • clear
  • requestInitialized
  • getSession
  • sessionCreated

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Kernel (java.awt.image)
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now