<commit_before>package com.brunobasto.ebnf.server;

import java.io.File;

import javax.servlet.ServletException;

import org.apache.catalina.LifecycleException;
import org.apache.catalina.startup.Tomcat;
public class Launcher {

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

		Tomcat tomcat = new Tomcat();

		String webPort = "8080";

		tomcat.setPort(Integer.valueOf(webPort));

		String path = new File("./" + webappDirLocation).getAbsolutePath();

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

			tomcat.start();<commit_msg>Configuring embed tomcat to allow servlets defined by annotations<commit_after>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(8080);

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

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

			File webInfClasses = new File("classes");

			VirtualDirContext resources = new VirtualDirContext();

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

			ctx.setResources(resources);

			tomcat.start();
{'fraction_non_alphanumeric': 0.11645226811103589, 'fraction_numerical': 0.005416384563303994, 'mean_word_length': 5.03265306122449, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7140661', 'n_tokens_mistral': 507, 'n_tokens_neox': 441, 'n_words': 97}