My webapp is ready but I just wanted to add a little dropdown menu with the username as title. This is my jsp code:
<i class="icon-user"></i>
<%
session.getAttribute("name");
%>
<span class="caret"></span>
and it sais
session cannot be resolved
9: <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
10: <i class="icon-user"></i>
11: <%
12: session.getAttribute("name");
13: %>
14: <span class="caret"></span>
15: </a>
There is a session because I’m logged in.
Kind regards,
You can use EL, which is prefered in JSP.
Or if the
namevalue is HTML safe, you can useMake sure the JSP is allow access session.
To use core JSTL, make sure the following code is included.