这是servlet中的代码:
HttpSession session = request.getSession(true);
session.setAttribute("user", user);
我正在将请求转发到JSP,在这里我想检查是否附加了会话范围的用户参数。
<c:if test="${??? - check if user is attached to request}">
/ /message
</c:if>
<c:if test="${sessionScope.user != null}">
There is a user **attribute** in the session
</c:if>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句