* Remove generated files
*/
public void removeGeneratedFiles() {
- try {
- String classFileName = ctxt.getClassFileName();
- if (classFileName != null) {
- File classFile = new File(classFileName);
- if (log.isDebugEnabled())
- log.debug("Deleting " + classFile);
- if (classFile.exists()) {
- if (!classFile.delete()) {
- log.warn(Localizer.getMessage(
- "jsp.warning.compiler.classfile.delete.fail",
- classFile.getAbsolutePath()));
- }
- }
- }
- } catch (Exception e) {
- // Remove as much as possible, ignore possible exceptions
- }
+ removeGeneratedClassFiles();
+
try {
String javaFileName = ctxt.getServletJavaFileName();
if (javaFileName != null) {
}
}
} catch (Exception e) {
- // Remove as much as possible, ignore possible exceptions
+ // Remove as much as possible, log possible exceptions
+ log.warn(Localizer.getMessage("jsp.warning.compiler.classfile.delete.fail.unknown"),
+ e);
}
}
}
}
} catch (Exception e) {
- // Remove as much as possible, ignore possible exceptions
+ // Remove as much as possible, log possible exceptions
+ log.warn(Localizer.getMessage("jsp.warning.compiler.classfile.delete.fail.unknown"),
+ e);
}
}
}
jsp.warning.compiler.class.notfound=Specified compiler plugin class {0} not found. Will default to Sun Java Compiler.
jsp.warning.compiler.path.notfound=Specified compiler path {0} not found. Will default to system PATH.
jsp.warning.compiler.classfile.delete.fail=Failed to delete generated class file [{0}]
+jsp.warning.compiler.classfile.delete.fail.unknown=Failed to delete generated class file(s)
jsp.warning.compiler.javafile.delete.fail=Failed to delete generated Java file [{0}]
+jsp.warning.compiler.javafile.delete.fail.unknown=Failed to delete generated Java file(s)
jsp.error.jspc.uriroot_not_dir=The -uriroot option must specify a pre-existing directory
jsp.error.jspc.missingTarget=Missing target: Must specify -webapp or -uriroot, or one or more JSP pages
jsp.error.jspc.no_uriroot=The uriroot is not specified and cannot be located with the specified JSP file(s)
jsp.message.jsp_removed_idle=Removing idle JSP for path [{0}] in context [{1}] after {2} seconds");
jsp.message.jsp_unload_check=Checking JSPs for unload in context [{0}], JSP count: {1} queue length: {2}
-xmlParser.skipBomFail=Failed to skip BOM when parsing XML input stream
\ No newline at end of file
+xmlParser.skipBomFail=Failed to skip BOM when parsing XML input stream