<?xml version="1.0" encoding="UTF-8"?>

<web-app version="3.1"
  xmlns="http://xmlns.jcp.org/xml/ns/javaee" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
  http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
  metadata-complete="false" >

  <servlet>
    <servlet-name>Index</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.IndexServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>Index</servlet-name>
    <url-pattern>/index.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>Graph</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.GraphServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>Graph</servlet-name>
    <url-pattern>/networksize.html</url-pattern>
    <url-pattern>/relayflags.html</url-pattern>
    <url-pattern>/versions.html</url-pattern>
    <url-pattern>/platforms.html</url-pattern>
    <url-pattern>/bandwidth.html</url-pattern>
    <url-pattern>/bandwidth-flags.html</url-pattern>
    <url-pattern>/dirbytes.html</url-pattern>
    <url-pattern>/advbwdist-perc.html</url-pattern>
    <url-pattern>/advbwdist-relay.html</url-pattern>
    <url-pattern>/userstats-relay-country.html</url-pattern>
    <url-pattern>/userstats-bridge-country.html</url-pattern>
    <url-pattern>/userstats-bridge-transport.html</url-pattern>
    <url-pattern>/userstats-bridge-combined.html</url-pattern>
    <url-pattern>/userstats-bridge-version.html</url-pattern>
    <url-pattern>/torperf.html</url-pattern>
    <url-pattern>/torperf-failures.html</url-pattern>
    <url-pattern>/onionperf-buildtimes.html</url-pattern>
    <url-pattern>/onionperf-latencies.html</url-pattern>
    <url-pattern>/onionperf-throughput.html</url-pattern>
    <url-pattern>/connbidirect.html</url-pattern>
    <url-pattern>/hidserv-dir-onions-seen.html</url-pattern>
    <url-pattern>/hidserv-rend-relayed-cells.html</url-pattern>
    <url-pattern>/webstats-tb.html</url-pattern>
    <url-pattern>/webstats-tb-platform.html</url-pattern>
    <url-pattern>/webstats-tb-locale.html</url-pattern>
    <url-pattern>/webstats-tb-channel.html</url-pattern>
    <url-pattern>/webstats-tm.html</url-pattern>
    <url-pattern>/relays-ipv6.html</url-pattern>
    <url-pattern>/bridges-ipv6.html</url-pattern>
    <url-pattern>/advbw-ipv6.html</url-pattern>
    <url-pattern>/totalcw.html</url-pattern>
    <url-pattern>/bridgedb-transport.html</url-pattern>
    <url-pattern>/bridgedb-distributor.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>Table</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.TableServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>Table</servlet-name>
    <url-pattern>/userstats-relay-table.html</url-pattern>
    <url-pattern>/userstats-censorship-events.html</url-pattern>
    <url-pattern>/userstats-bridge-table.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>Link</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.LinkServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>Link</servlet-name>
    <url-pattern>/oxford-anonymous-internet.html</url-pattern>
    <url-pattern>/uncharted-data-flow.html</url-pattern>
    <url-pattern>/uptimes.html</url-pattern>
    <url-pattern>/networkchurn.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>Bubbles</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.BubblesServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>Bubbles</servlet-name>
    <url-pattern>/bubbles.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>GraphImage</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.GraphImageServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>GraphImage</servlet-name>
    <url-pattern>/networksize.png</url-pattern>
    <url-pattern>/networksize.pdf</url-pattern>
    <url-pattern>/networksize.csv</url-pattern>
    <url-pattern>/relaycountries.png</url-pattern>
    <url-pattern>/relaycountries.pdf</url-pattern>
    <url-pattern>/relaycountries.csv</url-pattern>
    <url-pattern>/relayflags.png</url-pattern>
    <url-pattern>/relayflags.pdf</url-pattern>
    <url-pattern>/relayflags.csv</url-pattern>
    <url-pattern>/versions.png</url-pattern>
    <url-pattern>/versions.pdf</url-pattern>
    <url-pattern>/versions.csv</url-pattern>
    <url-pattern>/platforms.png</url-pattern>
    <url-pattern>/platforms.pdf</url-pattern>
    <url-pattern>/platforms.csv</url-pattern>
    <url-pattern>/bandwidth.png</url-pattern>
    <url-pattern>/bandwidth.pdf</url-pattern>
    <url-pattern>/bandwidth.csv</url-pattern>
    <url-pattern>/bandwidth-flags.png</url-pattern>
    <url-pattern>/bandwidth-flags.pdf</url-pattern>
    <url-pattern>/bandwidth-flags.csv</url-pattern>
    <url-pattern>/dirbytes.png</url-pattern>
    <url-pattern>/dirbytes.pdf</url-pattern>
    <url-pattern>/dirbytes.csv</url-pattern>
    <url-pattern>/torperf.png</url-pattern>
    <url-pattern>/torperf.pdf</url-pattern>
    <url-pattern>/torperf.csv</url-pattern>
    <url-pattern>/torperf-failures.png</url-pattern>
    <url-pattern>/torperf-failures.pdf</url-pattern>
    <url-pattern>/torperf-failures.csv</url-pattern>
    <url-pattern>/onionperf-buildtimes.png</url-pattern>
    <url-pattern>/onionperf-buildtimes.pdf</url-pattern>
    <url-pattern>/onionperf-buildtimes.csv</url-pattern>
    <url-pattern>/onionperf-latencies.png</url-pattern>
    <url-pattern>/onionperf-latencies.pdf</url-pattern>
    <url-pattern>/onionperf-latencies.csv</url-pattern>
    <url-pattern>/onionperf-throughput.png</url-pattern>
    <url-pattern>/onionperf-throughput.pdf</url-pattern>
    <url-pattern>/onionperf-throughput.csv</url-pattern>
    <url-pattern>/connbidirect.png</url-pattern>
    <url-pattern>/connbidirect.pdf</url-pattern>
    <url-pattern>/connbidirect.csv</url-pattern>
    <url-pattern>/userstats-relay-country.png</url-pattern>
    <url-pattern>/userstats-relay-country.pdf</url-pattern>
    <url-pattern>/userstats-relay-country.csv</url-pattern>
    <url-pattern>/userstats-bridge-country.png</url-pattern>
    <url-pattern>/userstats-bridge-country.pdf</url-pattern>
    <url-pattern>/userstats-bridge-country.csv</url-pattern>
    <url-pattern>/userstats-bridge-transport.png</url-pattern>
    <url-pattern>/userstats-bridge-transport.pdf</url-pattern>
    <url-pattern>/userstats-bridge-transport.csv</url-pattern>
    <url-pattern>/userstats-bridge-combined.png</url-pattern>
    <url-pattern>/userstats-bridge-combined.pdf</url-pattern>
    <url-pattern>/userstats-bridge-combined.csv</url-pattern>
    <url-pattern>/userstats-bridge-version.png</url-pattern>
    <url-pattern>/userstats-bridge-version.pdf</url-pattern>
    <url-pattern>/userstats-bridge-version.csv</url-pattern>
    <url-pattern>/advbwdist-perc.png</url-pattern>
    <url-pattern>/advbwdist-perc.pdf</url-pattern>
    <url-pattern>/advbwdist-perc.csv</url-pattern>
    <url-pattern>/advbwdist-relay.png</url-pattern>
    <url-pattern>/advbwdist-relay.pdf</url-pattern>
    <url-pattern>/advbwdist-relay.csv</url-pattern>
    <url-pattern>/hidserv-dir-onions-seen.png</url-pattern>
    <url-pattern>/hidserv-dir-onions-seen.pdf</url-pattern>
    <url-pattern>/hidserv-dir-onions-seen.csv</url-pattern>
    <url-pattern>/hidserv-rend-relayed-cells.png</url-pattern>
    <url-pattern>/hidserv-rend-relayed-cells.pdf</url-pattern>
    <url-pattern>/hidserv-rend-relayed-cells.csv</url-pattern>
    <url-pattern>/webstats-tb.png</url-pattern>
    <url-pattern>/webstats-tb.pdf</url-pattern>
    <url-pattern>/webstats-tb.csv</url-pattern>
    <url-pattern>/webstats-tb-platform.png</url-pattern>
    <url-pattern>/webstats-tb-platform.pdf</url-pattern>
    <url-pattern>/webstats-tb-platform.csv</url-pattern>
    <url-pattern>/webstats-tb-locale.png</url-pattern>
    <url-pattern>/webstats-tb-locale.pdf</url-pattern>
    <url-pattern>/webstats-tb-locale.csv</url-pattern>
    <url-pattern>/webstats-tb-channel.png</url-pattern>
    <url-pattern>/webstats-tb-channel.pdf</url-pattern>
    <url-pattern>/webstats-tb-channel.csv</url-pattern>
    <url-pattern>/webstats-tm.png</url-pattern>
    <url-pattern>/webstats-tm.pdf</url-pattern>
    <url-pattern>/webstats-tm.csv</url-pattern>
    <url-pattern>/relays-ipv6.png</url-pattern>
    <url-pattern>/relays-ipv6.pdf</url-pattern>
    <url-pattern>/relays-ipv6.csv</url-pattern>
    <url-pattern>/bridges-ipv6.png</url-pattern>
    <url-pattern>/bridges-ipv6.pdf</url-pattern>
    <url-pattern>/bridges-ipv6.csv</url-pattern>
    <url-pattern>/advbw-ipv6.png</url-pattern>
    <url-pattern>/advbw-ipv6.pdf</url-pattern>
    <url-pattern>/advbw-ipv6.csv</url-pattern>
    <url-pattern>/totalcw.png</url-pattern>
    <url-pattern>/totalcw.pdf</url-pattern>
    <url-pattern>/totalcw.csv</url-pattern>
    <url-pattern>/bridgedb-transport.png</url-pattern>
    <url-pattern>/bridgedb-transport.pdf</url-pattern>
    <url-pattern>/bridgedb-transport.csv</url-pattern>
    <url-pattern>/bridgedb-distributor.png</url-pattern>
    <url-pattern>/bridgedb-distributor.pdf</url-pattern>
    <url-pattern>/bridgedb-distributor.csv</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>AboutServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.AboutServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>AboutServlet</servlet-name>
    <url-pattern>/about.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>GlossaryServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.GlossaryServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>GlossaryServlet</servlet-name>
    <url-pattern>/glossary.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>MetricsGuidelinesServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.MetricsGuidelinesServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>MetricsGuidelinesServlet</servlet-name>  
    <url-pattern>/metrics-guidelines.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>NewsServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.NewsServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>NewsServlet</servlet-name>
    <url-pattern>/news.atom</url-pattern>
    <url-pattern>/news.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>SourcesServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.SourcesServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>SourcesServlet</servlet-name>
    <url-pattern>/sources.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>StatsServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.StatsServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>StatsServlet</servlet-name>
    <url-pattern>/stats.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>ReproducibleMetricsServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.ReproducibleMetricsServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ReproducibleMetricsServlet</servlet-name>
    <url-pattern>/reproducible-metrics.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>OperationServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.OperationServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>OperationServlet</servlet-name>
    <url-pattern>/operation.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>ServicesServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.ServicesServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ServicesServlet</servlet-name>
    <url-pattern>/services.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>DevelopmentServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.DevelopmentServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>DevelopmentServlet</servlet-name>
    <url-pattern>/development.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>MetricsLibServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.MetricsLibServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>MetricsLibServlet</servlet-name>
    <url-pattern>/metrics-lib.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>DataSourceServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.DataSourceServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>DataSourceServlet</servlet-name>
    <url-pattern>/bridge-descriptors.html</url-pattern>
    <url-pattern>/web-server-logs.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>CollecTorServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.CollecTorServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>CollecTorServlet</servlet-name>
    <url-pattern>/collector.html</url-pattern>
    <url-pattern>/collector/*</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>OnionooServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.OnionooServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>OnionooServlet</servlet-name>
    <url-pattern>/onionoo.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>ResearchServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.ResearchServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ResearchServlet</servlet-name>
    <url-pattern>/research.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>RelaySearch</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.RelaySearchServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>RelaySearch</servlet-name>
    <url-pattern>/rs.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>ExoneraTor</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.ExoneraTorWrapperServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ExoneraTor</servlet-name>
    <url-pattern>/exonerator.html</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

  <servlet>
    <servlet-name>ErrorServlet</servlet-name>
    <servlet-class>
      org.torproject.metrics.web.ErrorServlet
    </servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>ErrorServlet</servlet-name>
    <url-pattern>/error.html</url-pattern>
  </servlet-mapping>

  <servlet>
    <servlet-name>Default</servlet-name>
    <servlet-class>
      org.eclipse.jetty.servlet.DefaultServlet
    </servlet-class>
    <init-param>
      <param-name>aliases</param-name>
      <param-value>false</param-value>
    </init-param>
    <init-param>
      <param-name>acceptRanges</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>dirAllowed</param-name>
      <param-value>false</param-value>
    </init-param>
    <init-param>
      <param-name>welcomeServlets</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>redirectWelcome</param-name>
      <param-value>false</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>Default</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>

  <error-page>
    <error-code>400</error-code>
    <location>/error.html</location>
  </error-page>
  <error-page>
    <error-code>404</error-code>
    <location>/error.html</location>
  </error-page>
  <error-page>
    <error-code>500</error-code>
    <location>/error.html</location>
  </error-page>
  <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>/error.html</location>
  </error-page>

  <context-param>
    <param-name>rserveHost</param-name>
    <param-value>localhost</param-value>
  </context-param>
  <context-param>
    <param-name>rservePort</param-name>
    <param-value>6311</param-value>
  </context-param>
  <context-param>
    <param-name>maxCacheAge</param-name>
    <param-value>21600</param-value>
  </context-param>
  <context-param>
    <param-name>cachedGraphsDir</param-name>
    <param-value>
      /srv/metrics.torproject.org/metrics/website/rserve/graphs/
    </param-value>
  </context-param>
  <context-param>
    <param-name>baseUrl</param-name>
    <param-value>https://metrics.torproject.org</param-value>
  </context-param>

  <listener>
    <listener-class>
      org.torproject.metrics.web.RObjectGenerator
    </listener-class>
  </listener>

</web-app>

