Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何检查某些用户名是否已登录到应用程序?我想这样做,以便我可以重定向使用相同用户名的人注销。
仅供参考:我使用 appfuse 项目生成器。
在 JSP 中,您可以使用以下命令查看他们是否已登录:
<c:if test="${empty pageContext.request.remoteUser}"> not logged in </c:if> <c:if test="${not empty pageContext.request.remoteUser}"> logged in </c:if>