This is code in servlet:
HttpSession session = request.getSession(true);
session.setAttribute("user", user);
I am forwarding request to JSP, where i want to check if there is session scoped user parameter attached.
<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>
I think you mean checking the session scope right?
<c:if test="${!empty sessionScope.user}">
you can do that by using the following code
Setting session in Servlet
HttpSession session = request.getSession();
session.setAttribute("user", user);
Access session value by EL
in JSP
<p>${sessionScope:user}</p>
Checking the session in JSP
using JSTL
<c:if test="${sessionScope:user != null}" >
session value present......
</c:if>