title: Trying to print a session variable in a jsp causes error "equals expected"
body: <p>I am trying to pass a value from the session object to a custom tag <code>&lt;l:LoginStatus userId="&lt;% out.print((String)session.getAttribute("userId")); %&gt;"/&gt;</code></p>
  
  <p>Why does this line give me the error: <br><em>org.apache.jasper.JasperException: /index.jsp(1,1) /header.jsp(64,131) equal symbol expected</em></p>
  
  <p>When I pass a hard coded value like this <code>&lt;l:LoginStatus userId="4"/&gt;</code></p>
  
  <p>Everything works fine.</p>
  
  <p>It doesn't make any sense to me, I thought using <code>out.print</code> would make <code>=</code> uneccessary.</p>