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.
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337