When I send attribute 'saved' from servlet to jsp, if it equals to true I show alert msg otherwise I want to assign it to false in the second refresh.
Servlet:
saved = true;
request.setAttribute("saved", saved);
response.sendRedirect("temp/pr_home.jsp");
JSP:
<c:choose>
<c:when test="${saved==true}">
<c:out value="${saved}"> </c:out>
<div class="alert-box success" role="alert" >
Project Review has been saved! <a href="pr_home.jsp" > click here to see details </a>
</div>
<br />
</c:when>
<c:otherwise>
<div class="alert-box failure" role="alert">
This is a danger alert—check it out!
</div>
</c:otherwise>
</c:choose>
The flag variable 'saved' still in true all the time !! So, also alert message appears each time I refresh the page :(
Sorry for my English.
thank you for your help.