System.getProperty("org.apache.catalina.SESSION_PARAMETER_NAME",
"jsessionid");
+ /**
+ * Name of the system property containing
+ * the tomcat product installation path
+ */
+ public static final String CATALINA_HOME_PROP = "catalina.home";
+
+ /**
+ * Name of the system property containing
+ * the tomcat instance installation path
+ */
+ public static final String CATALINA_BASE_PROP = "catalina.base";
}
import java.io.PrintStream;
import java.util.StringTokenizer;
-import org.apache.catalina.Globals;
+import org.apache.jasper.Constants;
import org.apache.jasper.JasperException;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
logger.setErrorPrintStream(System.err);
logger.setMessageOutputLevel(Project.MSG_INFO);
project.addBuildListener( logger);
- if (System.getProperty(Globals.CATALINA_HOME_PROP) != null) {
- project.setBasedir(System.getProperty(Globals.CATALINA_HOME_PROP));
+ if (System.getProperty(Constants.CATALINA_HOME_PROP) != null) {
+ project.setBasedir(System.getProperty(Constants.CATALINA_HOME_PROP));
}
if( options.getCompiler() != null ) {
return project;
}
- public class JasperAntLogger extends DefaultLogger {
+ public static class JasperAntLogger extends DefaultLogger {
protected StringBuilder reportBuf = new StringBuilder();
@Override
protected void log(String message) {
reportBuf.append(message);
- reportBuf.append(System.getProperty("line.separator"));
+ reportBuf.append(Constants.NEWLINE);
}
protected String getReport() {
// Stop capturing the System.err output for this thread
String errorCapture = SystemLogHandler.unsetThread();
if (errorCapture != null) {
- errorReport.append(System.getProperty("line.separator"));
+ errorReport.append(Constants.NEWLINE);
errorReport.append(errorCapture);
}