DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=31257>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31257 java.endorsed.dirs is not used when JSP compilation is forked Summary: java.endorsed.dirs is not used when JSP compilation is forked Product: Tomcat 5 Version: 5.0.27 Platform: All OS/Version: Windows XP Status: NEW Severity: Critical Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When the JSP compiler forks a javac process, it should check to see what the currently endorsed directories are (check the system property "java.endorsed.dirs" - otherwise, classes end up missing and JSP pages do not properly compile. We experienced a problem when we explicitly set the java.endorsed.dirs property on the command line, and the JSP compiler did not use it when javac was forked. I have patched org.apache.jasper.compiler.Compiler to support this: *** src.original\jakarta-tomcat-jasper\jasper2 \src\share\org\apache\jasper\compiler\Compiler.java Tue Jun 15 17:30:35 2004 --- src\org\apache\jasper\compiler\Compiler.java Thu Sep 16 00:05:14 2004 *************** *** 349,358 **** --- 349,369 ---- extdirs.setPath(exts); javac.setExtdirs(extdirs); info.append(" extension dir=" + exts + "\n"); } + // Add endorsed directories + String endorsed = System.getProperty("java.endorsed.dirs"); + if(endorsed != null) { + Javac.ImplementationSpecificArgument endorsedArg = javac.createCompilerArg(); + endorsedArg.setLine("-J-Djava.endorsed.dirs="+endorsed); + info.append(" endorsed dir=" + endorsed + "\n"); + } + else { + info.append(" no endorsed dirs specified\n"); + } + // Configure the compiler object javac.setEncoding(javaEncoding); javac.setClasspath(path); javac.setDebug(ctxt.getOptions().getClassDebugInfo()); true, i should probably check ctxt.getOptions().getFork() in the if() as well, but since i always fork it doesn't matter to me. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]