blowtorch crufty tab indents; missing templates 404 instead of spewing logs
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1766 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -283,7 +283,18 @@ public class DispatcherServlet extends VelocityServlet
|
||||
ctx.put("context_path", req.getContextPath());
|
||||
|
||||
// then select the template
|
||||
Template tmpl = selectTemplate(siteId, ictx);
|
||||
Template tmpl = null;
|
||||
try {
|
||||
tmpl = selectTemplate(siteId, ictx);
|
||||
} catch (ResourceNotFoundException rnfe) {
|
||||
// send up a 404. For some annoying reason, Jetty tells
|
||||
// Apache that all is okay (200) when sending its own custom
|
||||
// error pages, forcing us to use Jetty's custom error page
|
||||
// handling code rather than passing it up the chain to be
|
||||
// dealt with appropriately.
|
||||
ictx.getResponse().sendError(HttpServletResponse.SC_NOT_FOUND);
|
||||
return null;
|
||||
}
|
||||
|
||||
// assume the request is in the default character set unless it
|
||||
// has actually been sensibly supplied by the browser
|
||||
|
||||
Reference in New Issue
Block a user