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

Last change on this file since 36281 was 36281, checked in by kjdon, 22 months ago

deleted the test servlet specification as we don't use it and it doesn't work

  • Property svn:keywords set to Author Date Id Revision
File size: 7.6 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 <!-- For client side text fetching -->
80 <servlet>
81 <servlet-name>grabtext</servlet-name>
82 <description>Grabs text for client-side display with minimal overhead.</description>
83 <servlet-class>org.greenstone.gsdl3.ClientSideServlet</servlet-class>
84 </servlet>
85
86 <!-- See servlets.xml -->
87 &servlets-config;
88 &flax-config;
89
90 <!-- the oai servlet. You can add multiple oai servlets by copying
91 the description and changing site_name and servlet_url params.
92 Remember to add the mapping here and the corresponding servlet_url
93 into build.properties -->
94 <servlet>
95 <servlet-name>oaiserver</servlet-name>
96 <description>the default oai servlet</description>
97 <servlet-class>org.greenstone.gsdl3.OAIServer</servlet-class>
98 <init-param>
99 <param-name>default_lang</param-name>
100 <param-value>en</param-value>
101 </init-param>
102 <init-param>
103 <param-name>site_name</param-name>
104 <param-value>localsite</param-value>
105 </init-param>
106 <!-- this needs to correspond to the value in the url-pattern
107 part of the mapping, below.-->
108 <init-param>
109 <param-name>servlet_url</param-name>
110 <param-value>oaiserver</param-value>
111 </init-param>
112 </servlet>
113
114 <!-- axis servlets -->
115 <servlet>
116 <servlet-name>AxisServlet</servlet-name>
117 <display-name>Apache-Axis Servlet</display-name>
118 <servlet-class>
119 org.apache.axis.transport.http.AxisServlet
120 </servlet-class>
121 </servlet>
122
123 <servlet>
124 <servlet-name>AdminServlet</servlet-name>
125 <display-name>Axis Admin Servlet</display-name>
126 <servlet-class>
127 org.apache.axis.transport.http.AdminServlet
128 </servlet-class>
129 <load-on-startup>100</load-on-startup>
130 </servlet>
131
132 <servlet>
133 <servlet-name>SOAPMonitorService</servlet-name>
134 <display-name>SOAPMonitorService</display-name>
135 <servlet-class>
136 org.apache.axis.monitor.SOAPMonitorService
137 </servlet-class>
138 <init-param>
139 <param-name>SOAPMonitorPort</param-name>
140 <param-value>5001</param-value>
141 </init-param>
142 <load-on-startup>100</load-on-startup>
143 </servlet>
144
145
146 <servlet>
147 <servlet-name>mat</servlet-name>
148 <description>Metadata Analysis Tool</description>
149 <servlet-class>org.greenstone.mat.servlet.MatServlet</servlet-class>
150 </servlet>
151
152
153 <!-- Define mappings that are used by the servlet container to
154 translate a particular request URI (context-relative) to a
155 particular servlet.
156
157 You may define any number of servlet mappings, including zero.
158 It is also legal to define more than one mapping for the same
159 servlet, if you wish to.
160 -->
161
162 <servlet-mapping>
163 <servlet-name>oaiserver</servlet-name>
164 <url-pattern>/oaiserver</url-pattern>
165 </servlet-mapping>
166
167 <servlet-mapping>
168 <servlet-name>grabtext</servlet-name>
169 <url-pattern>/grabtext</url-pattern>
170 </servlet-mapping>
171
172 <!-- axis mappings -->
173 <servlet-mapping>
174 <servlet-name>AxisServlet</servlet-name>
175 <url-pattern>/servlet/AxisServlet</url-pattern>
176 </servlet-mapping>
177
178 <servlet-mapping>
179 <servlet-name>AxisServlet</servlet-name>
180 <url-pattern>*.jws</url-pattern>
181 </servlet-mapping>
182
183 <servlet-mapping>
184 <servlet-name>AxisServlet</servlet-name>
185 <url-pattern>/services/*</url-pattern>
186 </servlet-mapping>
187
188 <servlet-mapping>
189 <servlet-name>mat</servlet-name>
190 <url-pattern>/mat</url-pattern>
191 </servlet-mapping>
192
193
194 <!-- uncomment this if you want to use the SOAPMonitorService. You will also
195 need to copy the SOAPMonitorApplet*.class files from
196 gsdl3/comms/soap/axis/web/WEB-INF/classes to the gsdl3/web directory. See the
197 comms/soap/axis/docs/install.html Appendix for details about how to use this -->
198 <!--
199 <servlet-mapping>
200 <servlet-name>SOAPMonitorService</servlet-name>
201 <url-pattern>/SOAPMonitor</url-pattern>
202 </servlet-mapping>
203 -->
204 <!-- uncomment this if you want the admin servlet -->
205 <!--
206 <servlet-mapping>
207 <servlet-name>AdminServlet</servlet-name>
208 <url-pattern>/servlet/AdminServlet</url-pattern>
209 </servlet-mapping>
210 -->
211
212 <!-- Define the default session timeout for your application,
213 in minutes. From a servlet or JSP page, you can modify
214 the timeout for a particular session dynamically by using
215 HttpSession.getMaxInactiveInterval(). -->
216
217 <session-config>
218 <session-timeout>240</session-timeout> <!-- 4 hours -->
219 </session-config>
220
221 <!-- axis mime-mappings -->
222 <mime-mapping>
223 <extension>wsdl</extension>
224 <mime-type>text/xml</mime-type>
225 </mime-mapping>
226
227 <mime-mapping>
228 <extension>xsd</extension>
229 <mime-type>text/xml</mime-type>
230 </mime-mapping>
231
232<!-- 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.
233http://stackoverflow.com/questions/5333266/tomcat-deny-access-to-specific-files
234and http://www.coderanch.com/t/84442/Tomcat/write-correct-url-pattern-security -->
235 <security-constraint>
236 <web-resource-collection>
237 <web-resource-name>log files</web-resource-name>
238 <description>No direct access to greenstone's logs.</description>
239 <url-pattern>/logs/*</url-pattern>
240 <http-method>POST</http-method>
241 <http-method>GET</http-method>
242 </web-resource-collection>
243 <auth-constraint>
244 <description>No direct browser access to log files.</description>
245 <role-name>NobodyHasThisRole</role-name>
246 </auth-constraint>
247 </security-constraint>
248
249</web-app>
Note: See TracBrowser for help on using the repository browser.