You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ru...@locus.apache.org on 2000/08/28 11:20:42 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/jasper/compiler Compiler.java
rubys 00/08/28 02:20:42
Modified: src/share/org/apache/jasper/compiler Tag: tomcat_32
Compiler.java
Log:
Original rationalle for this change captured for posterity:
In order to support JSPs (not precompiled) in our embedded environment we need
to get the jar files associated with tomcat (webserver.jar, etc) and our
embedding application jar files (APIs needed) into the path searched by the
compiler. We have added a system property (tc_path_add) with these jar files
into the list passed to the compiler in Compiler.java. We don't want to modify
java.class.path because other 3rd party code also running in the JVM.
These jar files are not in the java.class.path system property since we use our
own classloaders (URLClassLoaders). Based on a comment in the code there seems
to have been a jsp.class.path system property in the past that was removed that
may have been used for a similar purpose. It is possible to get this added back
in or is there an alternative solution in the works for this type of problem in
the 3.2 timeframe?
Submitted by: Mac Holloway <Ma...@tivoli.com>
Revision Changes Path
No revision
No revision
1.19.2.1 +12 -3 jakarta-tomcat/src/share/org/apache/jasper/compiler/Compiler.java
Index: Compiler.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/Compiler.java,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- Compiler.java 2000/06/27 20:59:40 1.19
+++ Compiler.java 2000/08/28 09:20:42 1.19.2.1
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/Compiler.java,v 1.19 2000/06/27 20:59:40 costin Exp $
- * $Revision: 1.19 $
- * $Date: 2000/06/27 20:59:40 $
+ * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/Compiler.java,v 1.19.2.1 2000/08/28 09:20:42 rubys Exp $
+ * $Revision: 1.19.2.1 $
+ * $Date: 2000/08/28 09:20:42 $
*
* ====================================================================
*
@@ -189,6 +189,11 @@
// System.getProperty("jsp.class.path", ".")
// business. If anyone badly needs this we can talk. -akv
+ // I'm adding tc_path_add because it solves a real problem
+ // and nobody has yet to come up with a better alternative.
+ // Note: this is in two places. Search for tc_path_add below.
+ // If you have one, please let me know. -Sam Ruby
+
String sep = System.getProperty("path.separator");
String[] argv = new String[]
{
@@ -196,6 +201,8 @@
javaEncoding,
"-classpath",
System.getProperty("java.class.path")+ sep + classpath
+ System.getProperty("java.class.path")+ sep + classpath + sep +
+ System.getProperty("tc_path_add") + sep
+ sep + ctxt.getOutputDir(),
"-d", ctxt.getOutputDir(),
javaFileName
@@ -225,9 +232,11 @@
/**
* Configure the compiler object
+ * See comment above: re tc_path_add
*/
javac.setEncoding(javaEncoding);
javac.setClasspath( System.getProperty("java.class.path")+ sep +
+ System.getProperty("tc_path_add") + sep +
classpath + sep + ctxt.getOutputDir());
javac.setOutputDir(ctxt.getOutputDir());
javac.setMsgOutput(out);