1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 |
|
---|
3 | <!DOCTYPE web-app
|
---|
4 | PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
---|
5 | "http://java.sun.com/dtd/web-app_2_3.dtd">
|
---|
6 |
|
---|
7 | <!-- this is based on a sample web.xml file provided by
|
---|
8 | http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/web.xml.txt
|
---|
9 | -->
|
---|
10 | <web-app>
|
---|
11 |
|
---|
12 |
|
---|
13 | <!-- General description of your web application -->
|
---|
14 |
|
---|
15 | <display-name>GSDL3</display-name>
|
---|
16 | <description>
|
---|
17 | Greenstone digital library version 3.
|
---|
18 | </description>
|
---|
19 |
|
---|
20 |
|
---|
21 | <!-- Context initialization parameters that define shared
|
---|
22 | String constants used within your application, which
|
---|
23 | can be customized by the system administrator who is
|
---|
24 | installing your application. The values actually
|
---|
25 | assigned to these parameters can be retrieved in a
|
---|
26 | servlet or JSP page by calling:
|
---|
27 |
|
---|
28 | String value =
|
---|
29 | getServletContext().getInitParameter("name");
|
---|
30 |
|
---|
31 | where "name" matches the <param-name> element of
|
---|
32 | one of these initialization parameters.
|
---|
33 |
|
---|
34 | You can define any number of context initialization
|
---|
35 | parameters, including zero.
|
---|
36 | -->
|
---|
37 |
|
---|
38 | <context-param>
|
---|
39 | <param-name>webmaster</param-name>
|
---|
40 | <param-value>[email protected]</param-value>
|
---|
41 | <description>
|
---|
42 | The EMAIL address of the administrator to whom questions
|
---|
43 | and comments about this application should be addressed.
|
---|
44 | </description>
|
---|
45 | </context-param>
|
---|
46 |
|
---|
47 |
|
---|
48 | <!-- Servlet definitions for the servlets that make up
|
---|
49 | your web application, including initialization
|
---|
50 | parameters. With Tomcat, you can also send requests
|
---|
51 | to servlets not listed here with a request like this:
|
---|
52 |
|
---|
53 | http://localhost:8080/{context-path}/servlet/{classname}
|
---|
54 |
|
---|
55 | but this usage is not guaranteed to be portable. It also
|
---|
56 | makes relative references to images and other resources
|
---|
57 | required by your servlet more complicated, so defining
|
---|
58 | all of your servlets (and defining a mapping to them with
|
---|
59 | a servlet-mapping element) is recommended.
|
---|
60 |
|
---|
61 | Servlet initialization parameters can be retrieved in a
|
---|
62 | servlet or JSP page by calling:
|
---|
63 |
|
---|
64 | String value =
|
---|
65 | getServletConfig().getInitParameter("name");
|
---|
66 |
|
---|
67 | where "name" matches the <param-name> element of
|
---|
68 | one of these initialization parameters.
|
---|
69 |
|
---|
70 | You can define any number of servlets, including zero.
|
---|
71 | -->
|
---|
72 | <!-- Note: I have left this one in as an example -kjdon -->
|
---|
73 | <!--
|
---|
74 | <servlet>
|
---|
75 | <servlet-name>controller</servlet-name>
|
---|
76 | <description>
|
---|
77 | This servlet plays the "controller" role in the MVC architecture
|
---|
78 | used in this application. It is generally mapped to the ".do"
|
---|
79 | filename extension with a <servlet-mapping> element, and all form
|
---|
80 | submits in the app will be submitted to a request URI like
|
---|
81 | "saveCustomer.do", which will therefore be mapped to this servlet.
|
---|
82 |
|
---|
83 | The initialization parameter namess for this servlet are the
|
---|
84 | "servlet path" that will be received by this servlet (after the
|
---|
85 | filename extension is removed). The corresponding value is the
|
---|
86 | name of the action class that will be used to process this request.
|
---|
87 | </description>
|
---|
88 | <servlet-class>com.mycompany.mypackage.ControllerServlet</servlet-class>
|
---|
89 | <init-param>
|
---|
90 | <param-name>listOrders</param-name>
|
---|
91 | <param-value>com.mycompany.myactions.ListOrdersAction</param-value>
|
---|
92 | </init-param>
|
---|
93 | <init-param>
|
---|
94 | <param-name>saveCustomer</param-name>
|
---|
95 | <param-value>com.mycompany.myactions.SaveCustomerAction</param-value>
|
---|
96 | </init-param>
|
---|
97 | <! Load this servlet at server startup time >
|
---|
98 | <load-on-startup>5</load-on-startup>
|
---|
99 | </servlet>
|
---|
100 | -->
|
---|
101 | <servlet>
|
---|
102 | <servlet-name>tester</servlet-name>
|
---|
103 | <description>a test servlet</description>
|
---|
104 | <servlet-class>TestServlet</servlet-class>
|
---|
105 | </servlet>
|
---|
106 |
|
---|
107 | <servlet>
|
---|
108 | <servlet-name>library</servlet-name>
|
---|
109 | <description>gsdl3 library program</description>
|
---|
110 | <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
|
---|
111 | <init-param>
|
---|
112 | <param-name>library_name</param-name>
|
---|
113 | <param-value>library</param-value>
|
---|
114 | </init-param>
|
---|
115 | <init-param>
|
---|
116 | <param-name>gsdl3_home</param-name>
|
---|
117 | <param-value>@gsdl3home@</param-value>
|
---|
118 | </init-param>
|
---|
119 | <init-param>
|
---|
120 | <param-name>site_name</param-name>
|
---|
121 | <param-value>localsite</param-value>
|
---|
122 | </init-param>
|
---|
123 | <init-param>
|
---|
124 | <param-name>interface_name</param-name>
|
---|
125 | <param-value>default</param-value>
|
---|
126 | </init-param>
|
---|
127 | <init-param>
|
---|
128 | <param-name>default_lang</param-name>
|
---|
129 | <param-value>en</param-value>
|
---|
130 | </init-param>
|
---|
131 | </servlet>
|
---|
132 |
|
---|
133 | <servlet>
|
---|
134 | <servlet-name>library1</servlet-name>
|
---|
135 | <description>gsdl3 library program</description>
|
---|
136 | <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
|
---|
137 | <init-param>
|
---|
138 | <param-name>library_name</param-name>
|
---|
139 | <param-value>library1</param-value>
|
---|
140 | </init-param>
|
---|
141 | <init-param>
|
---|
142 | <param-name>gsdl3_home</param-name>
|
---|
143 | <param-value>@gsdl3home@</param-value>
|
---|
144 | </init-param>
|
---|
145 | <init-param>
|
---|
146 | <param-name>site_name</param-name>
|
---|
147 | <param-value>soapsite</param-value>
|
---|
148 | </init-param>
|
---|
149 | <init-param>
|
---|
150 | <param-name>interface_name</param-name>
|
---|
151 | <param-value>default</param-value>
|
---|
152 | </init-param>
|
---|
153 | <init-param>
|
---|
154 | <param-name>default_lang</param-name>
|
---|
155 | <param-value>en</param-value>
|
---|
156 | </init-param>
|
---|
157 | </servlet>
|
---|
158 | <servlet>
|
---|
159 | <servlet-name>nzdl-library</servlet-name>
|
---|
160 | <description>gsdl3 library program</description>
|
---|
161 | <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
|
---|
162 | <init-param>
|
---|
163 | <param-name>library_name</param-name>
|
---|
164 | <param-value>nzdl</param-value>
|
---|
165 | </init-param>
|
---|
166 | <init-param>
|
---|
167 | <param-name>gsdl3_home</param-name>
|
---|
168 | <param-value>@gsdl3home@</param-value>
|
---|
169 | </init-param>
|
---|
170 | <init-param>
|
---|
171 | <param-name>site_name</param-name>
|
---|
172 | <param-value>nzdl</param-value>
|
---|
173 | </init-param>
|
---|
174 | <init-param>
|
---|
175 | <param-name>interface_name</param-name>
|
---|
176 | <param-value>nzdl</param-value>
|
---|
177 | </init-param>
|
---|
178 | <init-param>
|
---|
179 | <param-name>default_lang</param-name>
|
---|
180 | <param-value>en</param-value>
|
---|
181 | </init-param>
|
---|
182 | <init-param>
|
---|
183 | <param-name>receptionist</param-name>
|
---|
184 | <param-value>NZDLReceptionist</param-value>
|
---|
185 | </init-param>
|
---|
186 | <init-param>
|
---|
187 | <param-name>cgiargs</param-name>
|
---|
188 | <param-value>NZDLCGI</param-value>
|
---|
189 | </init-param>
|
---|
190 | </servlet>
|
---|
191 |
|
---|
192 | <!-- Define mappings that are used by the servlet container to
|
---|
193 | translate a particular request URI (context-relative) to a
|
---|
194 | particular servlet. The examples below correspond to the
|
---|
195 | servlet descriptions above. Thus, a request URI like:
|
---|
196 |
|
---|
197 | http://localhost:8080/{contextpath}/graph
|
---|
198 |
|
---|
199 | will be mapped to the "graph" servlet, while a request like:
|
---|
200 |
|
---|
201 | http://localhost:8080/{contextpath}/saveCustomer.do
|
---|
202 |
|
---|
203 | will be mapped to the "controller" servlet.
|
---|
204 |
|
---|
205 | Note: context path is determined by the servlet container -
|
---|
206 | in Tomcat, specified in server.xml -kjdon
|
---|
207 | You may define any number of servlet mappings, including zero.
|
---|
208 | It is also legal to define more than one mapping for the same
|
---|
209 | servlet, if you wish to.
|
---|
210 | -->
|
---|
211 | <!--
|
---|
212 | <servlet-mapping>
|
---|
213 | <servlet-name>controller</servlet-name>
|
---|
214 | <url-pattern>*.do</url-pattern>
|
---|
215 | </servlet-mapping>
|
---|
216 |
|
---|
217 | <servlet-mapping>
|
---|
218 | <servlet-name>graph</servlet-name>
|
---|
219 | <url-pattern>/graph</url-pattern>
|
---|
220 | </servlet-mapping>
|
---|
221 | -->
|
---|
222 |
|
---|
223 | <servlet-mapping>
|
---|
224 | <servlet-name>tester</servlet-name>
|
---|
225 | <url-pattern>/testing</url-pattern>
|
---|
226 | </servlet-mapping>
|
---|
227 |
|
---|
228 | <servlet-mapping>
|
---|
229 | <servlet-name>library</servlet-name>
|
---|
230 | <url-pattern>/library</url-pattern>
|
---|
231 | </servlet-mapping>
|
---|
232 |
|
---|
233 | <servlet-mapping>
|
---|
234 | <servlet-name>library1</servlet-name>
|
---|
235 | <url-pattern>/library1</url-pattern>
|
---|
236 | </servlet-mapping>
|
---|
237 |
|
---|
238 | <servlet-mapping>
|
---|
239 | <servlet-name>nzdl-library</servlet-name>
|
---|
240 | <url-pattern>/nzdl</url-pattern>
|
---|
241 | </servlet-mapping>
|
---|
242 |
|
---|
243 | <!-- Define the default session timeout for your application,
|
---|
244 | in minutes. From a servlet or JSP page, you can modify
|
---|
245 | the timeout for a particular session dynamically by using
|
---|
246 | HttpSession.getMaxInactiveInterval(). -->
|
---|
247 |
|
---|
248 | <session-config>
|
---|
249 | <session-timeout>30</session-timeout> <!-- 30 minutes -->
|
---|
250 | </session-config>
|
---|
251 |
|
---|
252 |
|
---|
253 | </web-app>
|
---|
254 |
|
---|
255 |
|
---|