Skip to content

Commit

Permalink
Params to make tomcat act like the old jetty server as far as possible.
Browse files Browse the repository at this point in the history
  • Loading branch information
csrster committed Oct 11, 2016
1 parent e01631e commit 173b590
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import javax.servlet.ServletException;

import org.apache.catalina.core.StandardContext;
import org.apache.catalina.core.StandardHost;
import org.apache.catalina.startup.Tomcat;
import org.apache.tomcat.util.scan.Constants;
import org.apache.tomcat.util.scan.StandardJarScanFilter;
Expand Down Expand Up @@ -93,6 +94,7 @@ public GUIWebServer() {
// Get a tomcat server.
server = new Tomcat();


System.setProperty("org.apache.catalina.startup.EXIT_ON_INIT_FAILURE", "true");

// Use directory in commontempdir for cache
Expand All @@ -110,7 +112,9 @@ public GUIWebServer() {
}

webapps.mkdirs();

server.getHost().setAppBase(webapps.getAbsolutePath());
server.getHost().setAutoDeploy(true);
((StandardHost) server.getHost()).setUnpackWARs(true);
//set the port on which tomcat should run
server.setPort(port);
boolean taglibsScanningDisabled = false;
Expand Down

0 comments on commit 173b590

Please sign in to comment.