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