source: gs3-extensions/atea-nlp-tools/trunk/src/ocr/src/main/webapp/WEB-INF/web.xml@ 35733

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

Add OCR servlet

File size: 4.1 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>Atea OCR Servlet</display-name>
11 <description>
12 A servlet that provides OCR capabilities for reo Māori documents.
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>tesseract</servlet-name>
68 <servlet-class>org.atea.nlptools.ocr.servlets.TesseractServlet</servlet-class>
69 <load-on-startup>0</load-on-startup>
70 </servlet>
71
72 <!-- Define mappings that are used by the servlet container to
73 translate a particular request URI (context-relative) to a
74 particular servlet. The examples below correspond to the
75 servlet descriptions above. Thus, a request URI like:
76
77 http://localhost:8080/{contextpath}/graph
78
79 will be mapped to the "graph" servlet, while a request like:
80
81 http://localhost:8080/{contextpath}/saveCustomer.do
82
83 will be mapped to the "controller" servlet.
84
85 You may define any number of servlet mappings, including zero.
86 It is also legal to define more than one mapping for the same
87 servlet, if you wish to.
88 -->
89
90 <filter-mapping>
91 <filter-name>CorsFilter</filter-name>
92 <url-pattern>/*</url-pattern>
93 </filter-mapping>
94
95 <servlet-mapping>
96 <servlet-name>tesseract</servlet-name>
97 <url-pattern>/tesseract</url-pattern>
98 </servlet-mapping>
99
100 <!-- Define the default session timeout for your application,
101 in minutes. From a servlet or JSP page, you can modify
102 the timeout for a particular session dynamically by using
103 HttpSession.getMaxInactiveInterval(). -->
104
105 <session-config>
106 <session-timeout>30</session-timeout> <!-- 30 minutes -->
107 </session-config>
108
109 <welcome-file-list>
110 <welcome-file>unauthorised.html</welcome-file>
111 </welcome-file-list>
112</web-app>
Note: See TracBrowser for help on using the repository browser.