larryi 01/09/08 16:40:24
Modified: src/facade22/org/apache/tomcat/facade JspInterceptor.java
Log:
For Jikes compilation, add a jikesClasspath property to JspInterceptor to
be included in Jikes' classpath. This setting is passed to JasperLiason
via a "jikes.class.path" system property.
Also, for Java2, automatically include "jre/lib/rt.jar" in Jikes' classpath.
Revision Changes Path
1.28 +22 -1
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java
Index: JspInterceptor.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/JspInterceptor.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- JspInterceptor.java 2001/07/20 13:05:39 1.27
+++ JspInterceptor.java 2001/09/08 23:40:24 1.28
@@ -186,6 +186,15 @@
public void setProperty( String n, String v ) {
args.put( n, v );
}
+
+ public void setJikesClasspath( String cp ) {
+ if( cp != null ) {
+ System.getProperties().put("jikes.class.path", cp);
+ if( debug > 0 )
+ log("Setting jikes.class.path to " + cp);
+ }
+ }
+
// -------------------- JspInterceptor properties --------------------
/** Use the old JspServlet to execute Jsps, instead of the
@@ -701,7 +710,19 @@
javac.setClassDebugInfo(options.getClassDebugInfo());
javac.setEncoding(javaEncoding);
- String cp=System.getProperty("java.class.path")+ sep +
+
+ String cp="";
+ if( javac instanceof JikesJavaCompiler ) {
+ if( !System.getProperty("java.version").startsWith("1.1") ) {
+ cp=System.getProperty("java.home") + File.separator +
+ "lib" + File.separator + "rt.jar" + sep;
+ }
+ String jikesCP = System.getProperty("jikes.class.path");
+ if( jikesCP != null && jikesCP.length() > 0 )
+ cp+=jikesCP + sep;
+ }
+
+ cp+=System.getProperty("java.class.path")+ sep +
ctxt.getClassPath() + sep + ctxt.getOutputDir();
javac.setClasspath( cp );
javac.setOutputDir(ctxt.getOutputDir());