title: How to get JSF2.0 sessionMap reference from a servlet
body: <p>Below code snippet is what I'm using.</p>
  
  <pre><code>ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
    Map&lt;String, Object&gt; sessionMap = externalContext.getSessionMap();
    sessionMap.put("User",user);
  </code></pre>
  
  <p>Now how can I get above "sessionMap" - "key" value from a plain "servlet"?
  Will the code like this <code>(User)session.getAttribute("User");</code> work by any chance from my servlet?</p>