[35247] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[35239] | 2 |
|
---|
[35247] | 3 | <web-app xmlns="http://java.sun.com/xml/ns/javaee"
|
---|
| 4 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
---|
| 5 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
---|
| 6 | http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
|
---|
| 7 | version="3.0">
|
---|
[35239] | 8 |
|
---|
| 9 | <!-- General description of your web application -->
|
---|
[35247] | 10 | <display-name>Korero Maori TTS ASR API Proxy</display-name>
|
---|
[35239] | 11 | <description>
|
---|
[35247] | 12 | A servlet that hosts a proxy for the speech-to-text ASR API of https://koreromaori.io/
|
---|
[35239] | 13 | </description>
|
---|
| 14 |
|
---|
| 15 | <!-- Context initialization parameters that define shared
|
---|
| 16 | String constants used within your application, which
|
---|
| 17 | can be customized by the system administrator who is
|
---|
| 18 | installing your application. The values actually
|
---|
| 19 | assigned to these parameters can be retrieved in a
|
---|
| 20 | servlet or JSP page by calling:
|
---|
| 21 |
|
---|
| 22 | String value =
|
---|
| 23 | getServletContext().getInitParameter("name");
|
---|
| 24 |
|
---|
| 25 | where "name" matches the <param-name> element of
|
---|
| 26 | one of these initialization parameters.
|
---|
| 27 |
|
---|
| 28 | You can define any number of context initialization
|
---|
| 29 | parameters, including zero.
|
---|
| 30 | -->
|
---|
| 31 |
|
---|
[35387] | 32 | <filter>
|
---|
| 33 | <filter-name>CorsFilter</filter-name>
|
---|
| 34 | <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
|
---|
| 35 | <init-param>
|
---|
| 36 | <param-name>cors.allowed.origins</param-name>
|
---|
| 37 | <param-value>http://localhost:8080</param-value> <!-- Separate values by a comma -->
|
---|
| 38 | </init-param>
|
---|
| 39 | </filter>
|
---|
| 40 |
|
---|
[35239] | 41 | <!-- Servlet definitions for the servlets that make up
|
---|
| 42 | your web application, including initialization
|
---|
| 43 | parameters. With Tomcat, you can also send requests
|
---|
| 44 | to servlets not listed here with a request like this:
|
---|
| 45 |
|
---|
| 46 | http://localhost:8080/{context-path}/servlet/{classname}
|
---|
| 47 |
|
---|
| 48 | but this usage is not guaranteed to be portable. It also
|
---|
| 49 | makes relative references to images and other resources
|
---|
| 50 | required by your servlet more complicated, so defining
|
---|
| 51 | all of your servlets (and defining a mapping to them with
|
---|
| 52 | a servlet-mapping element) is recommended.
|
---|
| 53 |
|
---|
| 54 | Servlet initialization parameters can be retrieved in a
|
---|
| 55 | servlet or JSP page by calling:
|
---|
| 56 |
|
---|
| 57 | String value =
|
---|
| 58 | getServletConfig().getInitParameter("name");
|
---|
| 59 |
|
---|
| 60 | where "name" matches the <param-name> element of
|
---|
| 61 | one of these initialization parameters.
|
---|
| 62 |
|
---|
| 63 | You can define any number of servlets, including zero.
|
---|
| 64 | -->
|
---|
| 65 |
|
---|
| 66 | <servlet>
|
---|
[35247] | 67 | <servlet-name>koreroMaoriTranscribe</servlet-name>
|
---|
[35251] | 68 | <servlet-class>org.atea.nlptools.koreromaoriproxy.TranscriptionServlet</servlet-class>
|
---|
[35239] | 69 | <load-on-startup>0</load-on-startup>
|
---|
| 70 | </servlet>
|
---|
| 71 |
|
---|
[35251] | 72 | <servlet>
|
---|
| 73 | <servlet-name>koreroMaoriTranscribeTest</servlet-name>
|
---|
| 74 | <servlet-class>org.atea.nlptools.koreromaoriproxy.TestServlet</servlet-class>
|
---|
| 75 | </servlet>
|
---|
| 76 |
|
---|
[35239] | 77 | <!-- Define mappings that are used by the servlet container to
|
---|
| 78 | translate a particular request URI (context-relative) to a
|
---|
| 79 | particular servlet. The examples below correspond to the
|
---|
| 80 | servlet descriptions above. Thus, a request URI like:
|
---|
| 81 |
|
---|
| 82 | http://localhost:8080/{contextpath}/graph
|
---|
| 83 |
|
---|
| 84 | will be mapped to the "graph" servlet, while a request like:
|
---|
| 85 |
|
---|
| 86 | http://localhost:8080/{contextpath}/saveCustomer.do
|
---|
| 87 |
|
---|
| 88 | will be mapped to the "controller" servlet.
|
---|
| 89 |
|
---|
| 90 | You may define any number of servlet mappings, including zero.
|
---|
| 91 | It is also legal to define more than one mapping for the same
|
---|
| 92 | servlet, if you wish to.
|
---|
| 93 | -->
|
---|
| 94 |
|
---|
[35387] | 95 | <filter-mapping>
|
---|
| 96 | <filter-name>CorsFilter</filter-name>
|
---|
| 97 | <url-pattern>/*</url-pattern>
|
---|
| 98 | </filter-mapping>
|
---|
| 99 |
|
---|
[35239] | 100 | <servlet-mapping>
|
---|
[35251] | 101 | <servlet-name>koreroMaoriTranscribeTest</servlet-name>
|
---|
| 102 | <url-pattern>/transcribe/test</url-pattern>
|
---|
| 103 | </servlet-mapping>
|
---|
| 104 |
|
---|
| 105 | <servlet-mapping>
|
---|
[35247] | 106 | <servlet-name>koreroMaoriTranscribe</servlet-name>
|
---|
[35239] | 107 | <url-pattern>/transcribe</url-pattern>
|
---|
| 108 | </servlet-mapping>
|
---|
| 109 |
|
---|
| 110 | <!-- Define the default session timeout for your application,
|
---|
| 111 | in minutes. From a servlet or JSP page, you can modify
|
---|
| 112 | the timeout for a particular session dynamically by using
|
---|
| 113 | HttpSession.getMaxInactiveInterval(). -->
|
---|
| 114 |
|
---|
| 115 | <session-config>
|
---|
| 116 | <session-timeout>30</session-timeout> <!-- 30 minutes -->
|
---|
| 117 | </session-config>
|
---|
| 118 |
|
---|
| 119 | <welcome-file-list>
|
---|
| 120 | <welcome-file>unauthorised.html</welcome-file>
|
---|
| 121 | </welcome-file-list>
|
---|
| 122 | </web-app>
|
---|