在servlet中,我设置了会话值
HttpSession session = httpRequest.getSession();
session.setAttribute("user", "adam");
然后,在JSP页面上,当我尝试获取值<c:out value="${user}"></c:out>
时,我收到错误According to TLD or attribute directive in tag file, attribute value does not accept any expressions
然后我如何获得会话变量?
答案 0 :(得分:4)
在JSP页面上使用 -
Username : ${sessionScope.user}