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 |
|
---|
96 | <!-- axis servlets -->
|
---|
97 | <!--
|
---|
98 | <servlet>
|
---|
99 | <servlet-name>AxisServlet</servlet-name>
|
---|
100 | <display-name>Apache-Axis Servlet</display-name>
|
---|
101 | <servlet-class>
|
---|
102 | org.apache.axis.transport.http.AxisServlet
|
---|
103 | </servlet-class>
|
---|
104 | </servlet>
|
---|
105 |
|
---|
106 | <servlet-mapping>
|
---|
107 | <servlet-name>AxisServlet</servlet-name>
|
---|
108 | <url-pattern>/servlet/AxisServlet</url-pattern>
|
---|
109 | </servlet-mapping>
|
---|
110 |
|
---|
111 | <servlet-mapping>
|
---|
112 | <servlet-name>AxisServlet</servlet-name>
|
---|
113 | <url-pattern>*.jws</url-pattern>
|
---|
114 | </servlet-mapping>
|
---|
115 |
|
---|
116 | <servlet-mapping>
|
---|
117 | <servlet-name>AxisServlet</servlet-name>
|
---|
118 | <url-pattern>/services/*</url-pattern>
|
---|
119 | </servlet-mapping>
|
---|
120 |
|
---|
121 | -->
|
---|
122 |
|
---|
123 | <!-- uncomment this if you want the axis admin servlet -->
|
---|
124 | <!--
|
---|
125 | <servlet>
|
---|
126 | <servlet-name>AdminServlet</servlet-name>
|
---|
127 | <display-name>Axis Admin Servlet</display-name>
|
---|
128 | <servlet-class>
|
---|
129 | org.apache.axis.transport.http.AdminServlet
|
---|
130 | </servlet-class>
|
---|
131 | <load-on-startup>100</load-on-startup>
|
---|
132 | </servlet>
|
---|
133 |
|
---|
134 | <servlet-mapping>
|
---|
135 | <servlet-name>AdminServlet</servlet-name>
|
---|
136 | <url-pattern>/servlet/AdminServlet</url-pattern>
|
---|
137 | </servlet-mapping>
|
---|
138 | -->
|
---|
139 |
|
---|
140 | <!-- uncomment this if you want to use the SOAPMonitorService. You will also
|
---|
141 | need to copy the SOAPMonitorApplet*.class files from
|
---|
142 | gsdl3/comms/soap/axis/web/WEB-INF/classes to the gsdl3/web directory. See the
|
---|
143 | comms/soap/axis/docs/install.html Appendix for details about how to use this -->
|
---|
144 | <!--
|
---|
145 | <servlet>
|
---|
146 | <servlet-name>SOAPMonitorService</servlet-name>
|
---|
147 | <display-name>SOAPMonitorService</display-name>
|
---|
148 | <servlet-class>
|
---|
149 | org.apache.axis.monitor.SOAPMonitorService
|
---|
150 | </servlet-class>
|
---|
151 | <init-param>
|
---|
152 | <param-name>SOAPMonitorPort</param-name>
|
---|
153 | <param-value>5001</param-value>
|
---|
154 | </init-param>
|
---|
155 | <load-on-startup>100</load-on-startup>
|
---|
156 | </servlet>
|
---|
157 |
|
---|
158 |
|
---|
159 | <servlet-mapping>
|
---|
160 | <servlet-name>SOAPMonitorService</servlet-name>
|
---|
161 | <url-pattern>/SOAPMonitor</url-pattern>
|
---|
162 | </servlet-mapping>
|
---|
163 |
|
---|
164 | -->
|
---|
165 | <!-- Metadata Analysis tool-->
|
---|
166 | <!--
|
---|
167 | <servlet>
|
---|
168 | <servlet-name>mat</servlet-name>
|
---|
169 | <description>Metadata Analysis Tool</description>
|
---|
170 | <servlet-class>org.greenstone.mat.servlet.MatServlet</servlet-class>
|
---|
171 | </servlet>
|
---|
172 |
|
---|
173 | <servlet-mapping>
|
---|
174 | <servlet-name>mat</servlet-name>
|
---|
175 | <url-pattern>/mat</url-pattern>
|
---|
176 | </servlet-mapping>
|
---|
177 |
|
---|
178 | -->
|
---|
179 |
|
---|
180 |
|
---|
181 | <!-- Define the default session timeout for your application,
|
---|
182 | in minutes. From a servlet or JSP page, you can modify
|
---|
183 | the timeout for a particular session dynamically by using
|
---|
184 | HttpSession.getMaxInactiveInterval(). -->
|
---|
185 |
|
---|
186 | <session-config>
|
---|
187 | <session-timeout>240</session-timeout> <!-- 4 hours -->
|
---|
188 | <cookie-config>
|
---|
189 | <http-only>true</http-only>
|
---|
190 | <secure>true</secure>
|
---|
191 | </cookie-config>
|
---|
192 | </session-config>
|
---|
193 |
|
---|
194 | <!-- axis mime-mappings -->
|
---|
195 | <mime-mapping>
|
---|
196 | <extension>wsdl</extension>
|
---|
197 | <mime-type>text/xml</mime-type>
|
---|
198 | </mime-mapping>
|
---|
199 |
|
---|
200 | <mime-mapping>
|
---|
201 | <extension>xsd</extension>
|
---|
202 | <mime-type>text/xml</mime-type>
|
---|
203 | </mime-mapping>
|
---|
204 |
|
---|
205 | <!-- 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.
|
---|
206 | http://stackoverflow.com/questions/5333266/tomcat-deny-access-to-specific-files
|
---|
207 | and http://www.coderanch.com/t/84442/Tomcat/write-correct-url-pattern-security -->
|
---|
208 | <security-constraint>
|
---|
209 | <web-resource-collection>
|
---|
210 | <web-resource-name>log files</web-resource-name>
|
---|
211 | <description>No direct access to greenstone's logs.</description>
|
---|
212 | <url-pattern>/logs/*</url-pattern>
|
---|
213 | <http-method>POST</http-method>
|
---|
214 | <http-method>GET</http-method>
|
---|
215 | </web-resource-collection>
|
---|
216 | <auth-constraint>
|
---|
217 | <description>No direct browser access to log files.</description>
|
---|
218 | <role-name>NobodyHasThisRole</role-name>
|
---|
219 | </auth-constraint>
|
---|
220 | </security-constraint>
|
---|
221 |
|
---|
222 | </web-app>
|
---|