« Return to Thread: bad does not throw exception

bad <jsp:include> does not throw exception

by aut :: Rate this Message:

Reply to Author | View in Thread

Jetty is not giving an error when I try to include a page that does not exist with <jsp:include>. However, Resin throws a FileNotFoundException, resulting in 500 status code.  I'm not sure that one is more correct than the other, but maybe you guys know?

Also, in case this matters - I have a filter that chains with a wrapped response object.  The jsp:include is resulting in a call: response.sendError(404).  But this error code never actually makes its way to the browser.

Below is a very simple test JSP.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<body>
  <p>Hi, I'm the BODY.</p>

   <!--the following throws a 500 java.io.FileNotFoundException: /sadfasdfsadf on resin -->
   <!--but jetty seems to ignore it -->
  <jsp:include page="sadfasdfsadf" />

</body>
</html>

 « Return to Thread: bad does not throw exception