0

I am including some JSP pages in one JSP page, whose names are in the keys of Map which I am iterating. In case if any of the JSP page is not found in my folder, then it throws exception, which I further handle in <c:catch>.

<c:set var="pagePath" value="/WEB-INF/pages/adminModule/"/>
<c:set var="jspName" value="${childItems.key}"/>
<c:set var="jspVar" value="${pagePath}organizationFilter${jspName}.jsp" />
<c:set var="jspVar" value="${fn:replace(jspVar,' ', '')}"/>

<c:catch var="e">
    <jsp:include page="${jspVar}"/>
</c:catch>

<c:if test="${!empty e}">
    <!-- ignore file doesnot exists-->
</c:if>

But the file not found exception is getting logged in server log. How can I stop that exception to come in server log?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Sumit
  • 9
  • 4
  • I am including some jsp pages in one jsp page, whose names are in the keys of map which i am iterating, in case if any of the jsp page is not found in my folder then it throws exception which i further handling in c:catch .But this file not found exception is getting logged in server log. – Sumit Aug 27 '15 at 10:38
  • How can i stop that exception to come in server log – Sumit Aug 27 '15 at 10:39

0 Answers0