The string you get back from the session is null, so your attempt to call toString() on it results in an NPE.
You should really use JSTL as well.
Something like
<c:choose>
<c:when test="not empty session.loggedUser">
...
</c:when>
<c:otherwise>
...
</c:otherwise>
</c:choose>
Makes it immediately apparent what you're trying to do, and will not result in an NPE.
Reputation Points: 1658
Solved Threads: 331
duckman
Offline 7,719 posts
since Nov 2004