/** * Chseck to see if included file exists, and display "not found" page if it doesn't. If "not * found" page does not exist, log an error and return null. * * @param includeResourcePath * @param currentResourcePath * @param directiveName * @return message. */ public String includeEvent( String includeResourcePath, String currentResourcePath, String directiveName) { /** check to see if page exists */ boolean exists = (rs.getLoaderNameForResource(includeResourcePath) != null); if (!exists) { context.put("missingResource", includeResourcePath); if (rs.getLoaderNameForResource(notfound) != null) { return notfound; } else { /** can't find not found, so display nothing */ rs.getLog().error("Can't find include not found page: " + notfound); return null; } } else return includeResourcePath; }