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();
	}

}
@@ -447,12 +447,10 @@
 ort(
-1234
+80
 );%0A%09
@@ -833,18 +833,16 @@
 rces);%0A%0A
-//
 %09%09%09tomca
@@ -917,18 +917,16 @@
 ();%0A%09%09%7D%0A
-//
 %09%09catch 
@@ -951,18 +951,16 @@
 n le) %7B%0A
-//
 %09%09%09le.pr
@@ -980,10 +980,8 @@
 ();%0A
-//
 %09%09%7D%0A

Use port 80