I want the user to be redirected to Login.jsp if the "role" stored in Session Scope doesn't match with the Request Parameter "accessRole"
HomePage.jsp
<jsp:include page="Header.jsp">
<jsp:param value="d" name="accessRole" />
</jsp:include>
Header.jsp
<c:if test="${sessionScope.role!=param.accessRole}">
<c:redirect url="Login.jsp"/>
</c:if>
The above code does not perform the redirection as expected.
I tried using ExternalContext's redirect() and jsp:forward in place of <c:redirect>, but nothing works.