The problem is: The jspInit method is called twice. The definition is: -The JSP background compilations are enable. (In default web.xml, define checkInterval and define development false.) -Define the JSP with <servlet> and <load-on-startup> tag in web.xml. The proposing: org/apache/jasper/compiler/Compiler.java ---- public void compile(boolean compileClass, boolean jspcMode) throws FileNotFoundException, JasperException, Exception { .... if( compileClass ) { File targetFile = new File(ctxt.getClassFileName()); if (targetFile.exists()) { long targetLastModified = targetFile.lastModified(); if (jsw != null) { jsw.setServletClassLastModifiedTime(targetLastModified); } } } }// last of the method. ---- Regards, Yuichiro
Created attachment 19692 [details] Patch to prevent double jspInit() when a JSP is set in web.xml to load-on-startup Confirmed in 5.5.23. I've attached a patch based on the OP's suggested fix.
*** Bug 45774 has been marked as a duplicate of this bug. ***
Chris - thanks for the patch. The patch has been applied to trunk and proposed for 6.0.x and 5.5.x
*** Bug 47013 has been marked as a duplicate of this bug. ***
This has been fixed in 6.0.x and will be included in 6.0.20 onwards.
This has been fixed in 5.5.x and will be included in 5.5.28 onwards.