User: cgjung
Date: 01/10/18 05:08:34
Modified: jetty/src/main/org/jboss/jetty JettyService.java
Log:
switched jetty.properties syntax back to *nix
JettyService now accepts and translates both *nix and WinX path
syntax for Jasper.
Revision Changes Path
1.25 +36 -2 contrib/jetty/src/main/org/jboss/jetty/JettyService.java
Index: JettyService.java
===================================================================
RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JettyService.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- JettyService.java 2001/09/18 23:06:49 1.24
+++ JettyService.java 2001/10/18 12:08:33 1.25
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: JettyService.java,v 1.24 2001/09/18 23:06:49 jules_gosnell Exp $
+// $Id: JettyService.java,v 1.25 2001/10/18 12:08:33 cgjung Exp $
package org.jboss.jetty;
@@ -15,6 +15,7 @@
import java.net.URL;
import java.util.Hashtable;
import java.util.Vector;
+import java.util.StringTokenizer;
import javax.management.MBeanRegistration;
import javax.management.MBeanServer;
import javax.management.ObjectName;
@@ -36,7 +37,7 @@
*
* @see <related>
* @author <a href="mailto:[EMAIL PROTECTED]">Julian Gosnell</a>
- * @version $Revision: 1.24 $
+ * @version $Revision: 1.25 $
*/
// NOTES
@@ -104,6 +105,36 @@
_log.info("connected JBoss and Jetty Log models");
}
+ /** the usual path separators we know */
+ protected final static String KNOWN_PATH_SEPARATORS=":;";
+
+ /** tiny helper that converts classpath properties to the target platform */
+ protected String convertPath(String original)
+ {
+ // should be set, but who knows
+ String separator=System.getProperty("path.separator",";");
+ boolean first=true;
+ StringBuffer result=new StringBuffer();
+ StringTokenizer tokenizer=new StringTokenizer(original,KNOWN_PATH_SEPARATORS);
+ while(tokenizer.hasMoreTokens()) {
+ if(!first) {
+ result.append(separator);
+ } else {
+ first=false;
+ }
+ result.append(tokenizer.nextToken());
+ }
+ return result.toString();
+ }
+
+ /** this is the property in which Jasper expects the additional classpath
+ */
+ protected final static String TC_PATH_ADD="tc_path_add";
+
+ /**
+ * enter the jetty.properties file to the system properties such that
+ * Jasper will find the right jars to compile
+ */
protected void
ensureProperties()
throws IOException
@@ -116,6 +147,9 @@
System.getProperties().load(propertiesIn);
+ // make sure that the tc_path_add property is correctly set
+ System.setProperty(TC_PATH_ADD,convertPath(System.getProperty(TC_PATH_ADD,"")));
+
_log.info("loaded properties from: "+props);
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development