Reputation: 3015
I have following row in jsp:
<jsp:include page="file.jsp"/>
but the file.jsp doesn't exist.
In localhost development environment (using jetty) this error is ignored. jsp is displayed correctly displaying whitespace instead of file.jsp.
In test server (using jboss) following exception is thrown and the jsp is not displayed at all:
Caused by: javax.servlet.ServletException: File "/WEB-INF/file.jsp" not found
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:304) ~[jbossweb-7.0.17.Final-redhat-1.jar!/:?]
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253) ~[jbossweb-7.0.17.Final-redhat-1.jar!/:?]
I guess there's some setting which controls if exception is thrown or not? But where can I set this? I would like to see this exception in dev environment already.
Upvotes: 0
Views: 636
Reputation: 1853
Instead of doing this, you can use :
<c:catch var ="catchException">
<jsp:include page="file.jsp"/>
</c:catch>
Upvotes: 1