0

How can I check whether a certain user is already signed into my application? I want to do this so I can redirect someone that tries to login using the same username to logout.

FYI: I use appfuse project generator.

1

1 Answer 1

1

In a JSP, you can use the following to see if they're logged in:

<c:if test="${empty pageContext.request.remoteUser}">
    not logged in
</c:if>
<c:if test="${not empty pageContext.request.remoteUser}">
    logged in
</c:if>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.