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