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