package com.brunobasto.ebnf.server;

import java.io.File;

import javax.servlet.ServletException;

import org.apache.catalina.LifecycleException;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.startup.Tomcat;
import org.apache.naming.resources.VirtualDirContext;
public class Launcher {

	public static void main(String[] args) {
		String webappDirLocation = "docroot/";

		Tomcat tomcat = new Tomcat();
		tomcat.setPort(1234);
		tomcat.setBaseDir(new File("tomcat").getAbsolutePath());

		String path = new File(webappDirLocation).getAbsolutePath();

		try {
			StandardContext ctx = (StandardContext)tomcat.addWebapp("/", path);

			VirtualDirContext resources = new VirtualDirContext();

			resources.setExtraResourcePaths(
				"/WEB-INF/classes=" + new File("classes")
			);

			ctx.setResources(resources);

			tomcat.start();
		}
		catch (ServletException se) {
			se.printStackTrace();
		}
		catch (LifecycleException le) {
			le.printStackTrace();
		}

		tomcat.getServer().await();
	}

}
@@ -835,16 +835,18 @@
 rces);%0A%0A
+//
 %09%09%09tomca
@@ -913,32 +913,34 @@
 ackTrace();%0A%09%09%7D%0A
+//
 %09%09catch (Lifecyc
@@ -957,16 +957,18 @@
 n le) %7B%0A
+//
 %09%09%09le.pr
@@ -980,24 +980,26 @@
 ackTrace();%0A
+//
 %09%09%7D%0A%0A%09%09tomca

Test heroku