Sometime its needed to handle JSP exceptio and handle caching accordingly. To handle the JSP exceptions and to not cache the error JSP following snippet helped us to handle the same.
<c:catch var="catchException">
<!—some JSP snippet which may/may not throw any exceptions à
</c:catch>
<c:if test="${catchException!=null}">
JSPHelper.setUncacheable(request,true);
</c:if>
JSPHelper.setUncacheable(request,true) – This turn off the caching for that particular request and hence will not cache any exception data.
No comments:
Post a Comment