title: Problem with session attributes in JSP EL using Spring MVC
body: <p>I'm trying to show a session attribute "userSession" in a jsp page using JSP EL, but it returns null (case 1). Request attributes are shown properly in EL expressions though.</p>
  
  <p>Using java scriptlet instead, behaves as shown in cases 2 and 3:</p>
  
  <ol>
  <li><code>&lt;c:out value="${userSession}"/&gt;</code> \\Returns null</li>
  <li><code>&lt;c:out value='&lt;%=request.getSession().getAttribute("userSession")%&gt;'/&gt;</code>
  \\Works fine - returns session attribute</li>
  <li><code>&lt;c:out value='&lt;%=session.getAttribute("userSession")%&gt;'/&gt;</code>
  \\Throws exception: cannot find variable session</li>
  </ol>
  
  <p>Exception of case 3 may be related to case 1 problem, something like not recognizing the session variable for some reason and that affecting the EL expression then.</p>
  
  <p>I'm using Spring MVC 2.5 and JSTL 1.1.2.</p>
  
  <p>I can post anything else needed to clarify the problem.</p>