package com.hammurapi.web;


import java.util.HashMap;
import java.util.Map;

import winstone.Launcher;

/**
 * Launches Winstone servlet container with args[0] or "WebContent" directory (if there are not arguments) as web root.
 * @author Pavel Vlasov
 *
 */
public class WebAppLauncher {

	public static void main(String[] args) throws Exception {
		Map wargs = new HashMap();
		wargs.put("webroot", args.length==0 ? "WebContent" : args[0]); 
		Launcher.initLogger(wargs);
		Launcher winstone = new Launcher(wargs); // spawns threads, so your application doesn't block
	}
	
}
