source: main/trunk/greenstone3/web/WEB-INF/web.xml@ 34527

Last change on this file since 34527 was 34527, checked in by ak19, 3 years ago

Kathy bugfix to flax: Adding a placeholder for the flax servlet. When we install Flax, flax.xml will be overwritten with a real one that actually defines a flax servlet.

  • Property svn:keywords set to Author Date Id Revision
File size: 7.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2<!DOCTYPE web-xml [
3 <!ENTITY servlets-config SYSTEM "servlets.xml">
4 <!ENTITY flax-config SYSTEM "flax.xml">
5]>
6
7
8<!-- this is based on a sample web.xml file provided by
9http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/web.xml.txt
10-->
11<web-app>
12 <display-name>GSDL3</display-name>
13 <description>
14 Greenstone digital library version 3.
15 </description>
16
17 <filter>
18 <filter-name>Greenstone URL Filter</filter-name>
19 <filter-class>org.greenstone.gsdl3.core.URLFilter</filter-class>
20 </filter>
21
22 <filter-mapping>
23 <filter-name>Greenstone URL Filter</filter-name>
24 <url-pattern>*</url-pattern>
25 </filter-mapping>
26
27 <!-- Context initialization parameters that define shared
28 String constants used within your application, which
29 can be customized by the system administrator who is
30 installing your application. The values actually
31 assigned to these parameters can be retrieved in a
32 servlet or JSP page by calling:
33
34 String value =
35 getServletContext().getInitParameter("name");
36
37 where "name" matches the <param-name> element of
38 one of these initialization parameters.
39
40 You can define any number of context initialization
41 parameters, including zero.
42 -->
43
44 <context-param>
45 <param-name>webmaster</param-name>
46 <param-value>[email protected]</param-value>
47 <description>
48 The EMAIL address of the administrator to whom questions
49 and comments about this application should be addressed.
50 </description>
51 </context-param>
52
53
54 <!-- Servlet definitions for the servlets that make up
55 your web application, including initialization
56 parameters. With Tomcat, you can also send requests
57 to servlets not listed here with a request like this:
58
59 http://localhost:8080/{context-path}/servlet/{classname}
60
61 but this usage is not guaranteed to be portable. It also
62 makes relative references to images and other resources
63 required by your servlet more complicated, so defining
64 all of your servlets (and defining a mapping to them with
65 a servlet-mapping element) is recommended.
66
67 Servlet initialization parameters can be retrieved in a
68 servlet or JSP page by calling:
69
70 String value =
71 getServletConfig().getInitParameter("name");
72
73 where "name" matches the <param-name> element of
74 one of these initialization parameters.
75
76 You can define any number of servlets, including zero.
77 -->
78
79 <!-- a very basic test servlet -->
80 <servlet>
81 <servlet-name>tester</servlet-name>
82 <description>a test servlet</description>
83 <servlet-class>TestServlet</servlet-class>
84 </servlet>
85
86 <!-- For client side text fetching -->
87 <servlet>
88 <servlet-name>grabtext</servlet-name>
89 <description>Grabs text for client-side display with minimal overhead.</description>
90 <servlet-class>org.greenstone.gsdl3.ClientSideServlet</servlet-class>
91 </servlet>
92
93 <!-- See servlets.xml -->
94 &servlets-config;
95 &flax-config;
96
97 <!-- the oai servlet. You can add multiple oai servlets by copying
98 the description and changing site_name and servlet_url params.
99 Remember to add the mapping here and the corresponding servlet_url
100 into build.properties -->
101 <servlet>
102 <servlet-name>oaiserver</servlet-name>
103 <description>the default oai servlet</description>
104 <servlet-class>org.greenstone.gsdl3.OAIServer</servlet-class>
105 <init-param>
106 <param-name>default_lang</param-name>
107 <param-value>en</param-value>
108 </init-param>
109 <init-param>
110 <param-name>site_name</param-name>
111 <param-value>localsite</param-value>
112 </init-param>
113 <!-- this needs to correspond to the value in the url-pattern
114 part of the mapping, below.-->
115 <init-param>
116 <param-name>servlet_url</param-name>
117 <param-value>oaiserver</param-value>
118 </init-param>
119 </servlet>
120
121 <!-- axis servlets -->
122 <servlet>
123 <servlet-name>AxisServlet</servlet-name>
124 <display-name>Apache-Axis Servlet</display-name>
125 <servlet-class>
126 org.apache.axis.transport.http.AxisServlet
127 </servlet-class>
128 </servlet>
129
130 <servlet>
131 <servlet-name>AdminServlet</servlet-name>
132 <display-name>Axis Admin Servlet</display-name>
133 <servlet-class>
134 org.apache.axis.transport.http.AdminServlet
135 </servlet-class>
136 <load-on-startup>100</load-on-startup>
137 </servlet>
138
139 <servlet>
140 <servlet-name>SOAPMonitorService</servlet-name>
141 <display-name>SOAPMonitorService</display-name>
142 <servlet-class>
143 org.apache.axis.monitor.SOAPMonitorService
144 </servlet-class>
145 <init-param>
146 <param-name>SOAPMonitorPort</param-name>
147 <param-value>5001</param-value>
148 </init-param>
149 <load-on-startup>100</load-on-startup>
150 </servlet>
151
152
153 <servlet>
154 <servlet-name>mat</servlet-name>
155 <description>Metadata Analysis Tool</description>
156 <servlet-class>org.greenstone.mat.servlet.MatServlet</servlet-class>
157 </servlet>
158
159
160 <!-- Define mappings that are used by the servlet container to
161 translate a particular request URI (context-relative) to a
162 particular servlet.
163
164 You may define any number of servlet mappings, including zero.
165 It is also legal to define more than one mapping for the same
166 servlet, if you wish to.
167 -->
168
169 <servlet-mapping>
170 <servlet-name>oaiserver</servlet-name>
171 <url-pattern>/oaiserver</url-pattern>
172 </servlet-mapping>
173
174 <servlet-mapping>
175 <servlet-name>tester</servlet-name>
176 <url-pattern>/testing</url-pattern>
177 </servlet-mapping>
178
179 <servlet-mapping>
180 <servlet-name>grabtext</servlet-name>
181 <url-pattern>/grabtext</url-pattern>
182 </servlet-mapping>
183
184 <!-- axis mappings -->
185 <servlet-mapping>
186 <servlet-name>AxisServlet</servlet-name>
187 <url-pattern>/servlet/AxisServlet</url-pattern>
188 </servlet-mapping>
189
190 <servlet-mapping>
191 <servlet-name>AxisServlet</servlet-name>
192 <url-pattern>*.jws</url-pattern>
193 </servlet-mapping>
194
195 <servlet-mapping>
196 <servlet-name>AxisServlet</servlet-name>
197 <url-pattern>/services/*</url-pattern>
198 </servlet-mapping>
199
200 <servlet-mapping>
201 <servlet-name>mat</servlet-name>
202 <url-pattern>/mat</url-pattern>
203 </servlet-mapping>
204
205
206 <!-- uncomment this if you want to use the SOAPMonitorService. You will also
207 need to copy the SOAPMonitorApplet*.class files from
208 gsdl3/comms/soap/axis/web/WEB-INF/classes to the gsdl3/web directory. See the
209 comms/soap/axis/docs/install.html Appendix for details about how to use this -->
210 <!--
211 <servlet-mapping>
212 <servlet-name>SOAPMonitorService</servlet-name>
213 <url-pattern>/SOAPMonitor</url-pattern>
214 </servlet-mapping>
215 -->
216 <!-- uncomment this if you want the admin servlet -->
217 <!--
218 <servlet-mapping>
219 <servlet-name>AdminServlet</servlet-name>
220 <url-pattern>/servlet/AdminServlet</url-pattern>
221 </servlet-mapping>
222 -->
223
224 <!-- Define the default session timeout for your application,
225 in minutes. From a servlet or JSP page, you can modify
226 the timeout for a particular session dynamically by using
227 HttpSession.getMaxInactiveInterval(). -->
228
229 <session-config>
230 <session-timeout>240</session-timeout> <!-- 4 hours -->
231 </session-config>
232
233 <!-- axis mime-mappings -->
234 <mime-mapping>
235 <extension>wsdl</extension>
236 <mime-type>text/xml</mime-type>
237 </mime-mapping>
238
239 <mime-mapping>
240 <extension>xsd</extension>
241 <mime-type>text/xml</mime-type>
242 </mime-mapping>
243
244<!-- Deny access to contents of URL pattern /logs/*, although greenstone.log is the important one. It appears the url pattern has to be relative to the web directory.
245http://stackoverflow.com/questions/5333266/tomcat-deny-access-to-specific-files
246and http://www.coderanch.com/t/84442/Tomcat/write-correct-url-pattern-security -->
247 <security-constraint>
248 <web-resource-collection>
249 <web-resource-name>log files</web-resource-name>
250 <description>No direct access to greenstone's logs.</description>
251 <url-pattern>/logs/*</url-pattern>
252 <http-method>POST</http-method>
253 <http-method>GET</http-method>
254 </web-resource-collection>
255 <auth-constraint>
256 <description>No direct browser access to log files.</description>
257 <role-name>NobodyHasThisRole</role-name>
258 </auth-constraint>
259 </security-constraint>
260
261</web-app>
Note: See TracBrowser for help on using the repository browser.