In the servlet, I set session value
HttpSession session = httpRequest.getSession();
session.setAttribute("user", "adam");
Then, on the JSP page, when I try to get the value <c:out value="${user}"></c:out>, I got the error According to TLD or attribute directive in tag file, attribute value does not accept any expressions
Then how can I get the session variable?
On your JSP page use -
Username : ${sessionScope.user}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With