source: gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/webapp/WEB-INF/web.xml

Last change on this file was 35765, checked in by cstephen, 2 years ago

Fix web.xml

File size: 4.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
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">
8
9 <!-- General description of your web application -->
10 <display-name>Korero Maori TTS ASR API Proxy</display-name>
11 <description>
12 A servlet that hosts a proxy for the speech-to-text ASR API of https://koreromaori.io/
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
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
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>
67 <servlet-name>koreroMaoriTranscribe</servlet-name>
68 <servlet-class>org.atea.nlptools.koreromaoriproxy.TranscriptionServlet</servlet-class>
69 </servlet>
70
71 <servlet>
72 <servlet-name>koreroMaoriTranscribeTest</servlet-name>
73 <servlet-class>org.atea.nlptools.koreromaoriproxy.TestServlet</servlet-class>
74 </servlet>
75
76 <!-- Define mappings that are used by the servlet container to
77 translate a particular request URI (context-relative) to a
78 particular servlet. The examples below correspond to the
79 servlet descriptions above. Thus, a request URI like:
80
81 http://localhost:8080/{contextpath}/graph
82
83 will be mapped to the "graph" servlet, while a request like:
84
85 http://localhost:8080/{contextpath}/saveCustomer.do
86
87 will be mapped to the "controller" servlet.
88
89 You may define any number of servlet mappings, including zero.
90 It is also legal to define more than one mapping for the same
91 servlet, if you wish to.
92 -->
93
94 <filter-mapping>
95 <filter-name>CorsFilter</filter-name>
96 <url-pattern>/*</url-pattern>
97 </filter-mapping>
98
99 <!-- <servlet-mapping>
100 <servlet-name>koreroMaoriTranscribeTest</servlet-name>
101 <url-pattern>/transcribe/test</url-pattern>
102 </servlet-mapping> -->
103
104 <servlet-mapping>
105 <servlet-name>koreroMaoriTranscribe</servlet-name>
106 <url-pattern>/transcribe</url-pattern>
107 </servlet-mapping>
108
109 <!-- Define the default session timeout for your application,
110 in minutes. From a servlet or JSP page, you can modify
111 the timeout for a particular session dynamically by using
112 HttpSession.getMaxInactiveInterval(). -->
113
114 <session-config>
115 <session-timeout>30</session-timeout> <!-- 30 minutes -->
116 </session-config>
117
118 <welcome-file-list>
119 <welcome-file>unauthorised.html</welcome-file>
120 </welcome-file-list>
121</web-app>
Note: See TracBrowser for help on using the repository browser.