Skip to content
Permalink
Browse files

Quick experiment to try setting the root context.

  • Loading branch information...
csrster committed Sep 19, 2016
1 parent 2c47828 commit cd30bf76b31f85684d1f5460765f2e53dd198691
@@ -26,6 +26,7 @@

import javax.servlet.ServletException;

import org.apache.catalina.Context;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.startup.Tomcat;
import org.apache.tomcat.util.scan.Constants;
@@ -144,12 +145,24 @@ public GUIWebServer() {
StandardJarScanFilter jarScanFilter = (StandardJarScanFilter) ctx.getJarScanner().getJarScanFilter();
jarScanFilter.setTldSkip("*");
}
if (i==0) {
//Re-add the 1st context as also the root context
StandardContext rootCtx = (StandardContext) server.addWebapp("/", warfile);

//Disable TLD scanning by default
if (System.getProperty(Constants.SKIP_JARS_PROPERTY) == null && System.getProperty(Constants.SKIP_JARS_PROPERTY) == null) {
System.out.println("disabling TLD scanning");
StandardJarScanFilter jarScanFilter = (StandardJarScanFilter) rootCtx .getJarScanner().getJarScanFilter();
jarScanFilter.setTldSkip("*");
}
}
}
catch (ServletException e)
{
log.error("Unable to add webapp " + webApps[i], e);
}
}

}


@@ -168,6 +181,7 @@ public static synchronized GUIWebServer getInstance() {
}



/**
* Starts the jetty web server.
*

0 comments on commit cd30bf7

Please sign in to comment.
You can’t perform that action at this time.