<commit_before><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                         "http://java.sun.com/dtd/web-app_2_3.dtd">
<!--
NOTE: some servers e.g. the awesome http://github.com/calavera/trinidad don't
      play well with the XML doctype (or namespace) declaration e.g. :

  Oct 9, 2010 1:20:07 PM org.apache.coyote.ajp.AjpProtocol init
  INFO: Initializing Coyote AJP/1.3 on ajp-3031
  Oct 9, 2010 1:20:07 PM org.apache.coyote.http11.Http11Protocol init
  INFO: Initializing Coyote HTTP/1.1 on http-3000
  Oct 9, 2010 1:20:07 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Tomcat
  Oct 9, 2010 1:20:07 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.2
  Oct 9, 2010 1:20:07 PM org.apache.catalina.startup.ContextConfig webConfig
  INFO: No global web.xml found
  Oct 9, 2010 1:20:09 PM org.apache.catalina.startup.ContextConfig configureStart
  SEVERE: Marking this application unavailable due to previous error(s)
  Oct 9, 2010 1:20:09 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Error getConfigured
  Oct 9, 2010 1:20:09 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Context [/] startup failed due to previous errors

in that case just remove the above web-app DTD or make sure there's no schema
declared within Your web-app root XML element !
-->
<web-app>

    <context-param>
        <param-name>rails.env</param-name>
        <param-value>production</param-value>
    </context-param>

    <context-param>
        <param-name>public.root</param-name>
        <param-value>/</param-value>
    </context-param>

    <context-param>
        <param-name>jruby.min.runtimes</param-name>
        <param-value>1</param-value>
    </context-param>
    <context-param>
        <param-name>jruby.max.runtimes</param-name>
        <param-value>1</param-value>
    </context-param>

    <filter>
        <filter-name>RackFilter</filter-name>
        <filter-class>org.jruby.rack.RackFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>RackFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>org.jruby.rack.rails.RailsServletContextListener</listener-class>
    </listener>

    <!-- worker(s) will execute this script : -->
    <context-param>
        <param-name>jruby.worker.script</param-name>
        <param-value>require 'delayed/jruby_worker' || Delayed::JRubyWorker.new.start</param-value>
    </context-param>
    <!-- if You script is located in a rb file use : -->
    <!--
    <context-param>
        <param-name>jruby.worker.script.path</param-name>
        <param-value>delayed/start_worker.rb</param-value>
    </context-param>-->
    <!-- if one worker thread is not enough, increase the value : -->
    <context-param>
        <param-name>jruby.worker.thread.count</param-name>
        <param-value>1</param-value>
    </context-param>
    <!-- You might also change the worker thread priority (use with caution) : -->
    <!-- accepted values are MIN, MAX, NORM and integer values <1..10> -->
    <context-param>
        <param-name>jruby.worker.thread.priority</param-name>
        <param-value>NORM</param-value>
    </context-param>

    <!-- make sure it's declared after the "default" jruby-rack listener : -->
    <listener>
        <listener-class>org.kares.jruby.rack.WorkerContextListener</listener-class>
    </listener>

</web-app><commit_msg>a better test sample web.xml<commit_after><!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                         "http://java.sun.com/dtd/web-app_2_3.dtd">
<!--
NOTE: some servers e.g. the awesome http://github.com/calavera/trinidad don't
      play well with the XML doctype (or namespace) declaration e.g. :

  Oct 9, 2010 1:20:07 PM org.apache.coyote.ajp.AjpProtocol init
  INFO: Initializing Coyote AJP/1.3 on ajp-3031
  Oct 9, 2010 1:20:07 PM org.apache.coyote.http11.Http11Protocol init
  INFO: Initializing Coyote HTTP/1.1 on http-3000
  Oct 9, 2010 1:20:07 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Tomcat
  Oct 9, 2010 1:20:07 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.2
  Oct 9, 2010 1:20:07 PM org.apache.catalina.startup.ContextConfig webConfig
  INFO: No global web.xml found
  Oct 9, 2010 1:20:09 PM org.apache.catalina.startup.ContextConfig configureStart
  SEVERE: Marking this application unavailable due to previous error(s)
  Oct 9, 2010 1:20:09 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Error getConfigured
  Oct 9, 2010 1:20:09 PM org.apache.catalina.core.StandardContext startInternal
  SEVERE: Context [/] startup failed due to previous errors

in that case just remove the above web-app DTD or make sure there's no schema
declared within Your web-app root XML element !
-->
<web-app>

    <context-param>
        <param-name>rails.env</param-name>
        <param-value>production</param-value>
    </context-param>

    <context-param>
        <param-name>public.root</param-name>
        <param-value>/</param-value>
    </context-param>

    <context-param>
        <param-name>jruby.min.runtimes</param-name>
        <param-value>1</param-value>
    </context-param>
    <context-param>
        <param-name>jruby.max.runtimes</param-name>
        <param-value>1</param-value>
    </context-param>

    <filter>
        <filter-name>RackFilter</filter-name>
        <filter-class>org.jruby.rack.RackFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>RackFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <listener>
        <listener-class>org.jruby.rack.rails.RailsServletContextListener</listener-class>
    </listener>

    <!-- worker(s) will execute this script : -->
    <context-param>
        <param-name>jruby.worker.script</param-name>
        <param-value>require 'delayed/jruby_worker'; Delayed::JRubyWorker.new.start</param-value>
    </context-param>
    <!-- if You script is located in a rb file use : -->
    <!-- (please note that jruby.worker.script and jruby.worker.script.path params
         are exclusive and the first one takes precedence over the second one !) -->
    <!--
    <context-param>
        <param-name>jruby.worker.script.path</param-name>
        <param-value>delayed/start_worker.rb</param-value>
    </context-param>-->
    <!-- if one worker thread is not enough, increase the value (defaults to 1) : -->
    <context-param>
        <param-name>jruby.worker.thread.count</param-name>
        <param-value>1</param-value>
    </context-param>
    <!-- You might also change the worker thread priority (use with caution) : -->
    <!-- accepted values are MIN, MAX, NORM and integer values <1..10> (default is NORM) -->
    <context-param>
        <param-name>jruby.worker.thread.priority</param-name>
        <param-value>NORM</param-value>
    </context-param>

    <!-- make sure it's declared after the "default" jruby-rack listener : -->
    <listener>
        <listener-class>org.kares.jruby.rack.WorkerContextListener</listener-class>
    </listener>

</web-app>
{'fraction_non_alphanumeric': 0.13547505126452494, 'fraction_numerical': 0.029938482570061518, 'mean_word_length': 2.9653116531165313, 'pattern_counts': {'":': 0, '<': 164, '<?xml version=': 0, '>': 164, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '2996235', 'n_tokens_mistral': 2577, 'n_tokens_neox': 2303, 'n_words': 544}