Index: /main/trunk/greenstone3/web/WEB-INF/servlets.xml
===================================================================
--- /main/trunk/greenstone3/web/WEB-INF/servlets.xml	(revision 29687)
+++ /main/trunk/greenstone3/web/WEB-INF/servlets.xml	(revision 29687)
@@ -0,0 +1,160 @@
+<servlet>
+	<servlet-name>library</servlet-name>
+	<description>The standard gsdl3 library program</description>
+	<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
+	<init-param>
+		<param-name>library_name</param-name>
+		<param-value>library</param-value>
+	</init-param>
+	<init-param>
+		<param-name>site_name</param-name>
+		<param-value>localsite</param-value>
+	</init-param>
+	<init-param>
+		<param-name>interface_name</param-name>
+		<param-value>default</param-value>
+	</init-param>
+	<init-param>
+		<param-name>receptionist_class</param-name>
+		<param-value>DefaultReceptionist</param-value>
+	</init-param>
+	<init-param>
+		<param-name>default_lang</param-name>
+		<param-value>en</param-value>
+	</init-param>
+</servlet>
+
+<servlet>
+	<servlet-name>gs2-library</servlet-name>
+	<description>Greenstone 2 lookalike library program: uses localsite with the gs2 interface</description>
+	<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
+	<init-param>
+		<param-name>library_name</param-name>
+		<param-value>gs2-library</param-value>
+	</init-param>
+	<init-param>
+		<param-name>site_name</param-name>
+		<param-value>localsite</param-value>
+	</init-param>
+	<init-param>
+		<param-name>interface_name</param-name>
+		<param-value>gs2</param-value>
+	</init-param>
+	<init-param>
+		<param-name>default_lang</param-name>
+		<param-value>en</param-value>
+	</init-param>
+	<init-param>
+		<param-name>session_expiration</param-name>
+		<param-value>1800</param-value>
+	</init-param>
+	<init-param>
+		<param-name>params_class</param-name>
+		<param-value>GS2Params</param-value>
+	</init-param>
+</servlet>
+
+<servlet>
+	<servlet-name>nzdl-library</servlet-name>
+	<description>gsdl3 library program</description>
+	<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
+	<init-param>
+		<param-name>library_name</param-name>
+		<param-value>nzdl</param-value>
+	</init-param>
+	<init-param>
+		<param-name>site_name</param-name>
+		<param-value>nzdl</param-value>
+	</init-param>
+	<init-param>
+		<param-name>interface_name</param-name>
+		<param-value>nzdl</param-value>
+	</init-param>
+	<init-param>
+		<param-name>default_lang</param-name>
+		<param-value>en</param-value>
+	</init-param>
+	<init-param>
+		<param-name>params_class</param-name>
+		<param-value>NZDLParams</param-value>
+	</init-param>
+	<init-param>
+		<param-name>session_expiration</param-name>
+		<param-value>600</param-value>
+	</init-param>
+</servlet>
+
+<servlet>
+	<servlet-name>gateway</servlet-name>
+	<description>gsdl3 library based on gateway site and basic interface. It uses SOAP to talk to localsite</description>
+	<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
+	<init-param>
+		<param-name>library_name</param-name>
+		<param-value>gateway</param-value>
+	</init-param>
+	<init-param>
+		<param-name>site_name</param-name>
+		<param-value>gateway</param-value>
+	</init-param>
+	<init-param>
+		<param-name>interface_name</param-name>
+		<param-value>basic</param-value>
+	</init-param>
+	<init-param>
+		<param-name>default_lang</param-name>
+		<param-value>en</param-value>
+	</init-param>
+</servlet>
+
+<servlet>
+	<servlet-name>basic-library</servlet-name>
+	<description>basic gsdl3 library program: uses localsite and the basic interface</description>
+	<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
+	<init-param>
+		<param-name>library_name</param-name>
+		<param-value>basic-library</param-value>
+	</init-param>
+	<init-param>
+		<param-name>site_name</param-name>
+		<param-value>localsite</param-value>
+	</init-param>
+	<init-param>
+		<param-name>interface_name</param-name>
+		<param-value>basic</param-value>
+	</init-param>
+	<init-param>
+		<param-name>default_lang</param-name>
+		<param-value>en</param-value>
+	</init-param>
+	<!--<init-param>
+		<param-name>allow_client_side_xslt</param-name>
+		<param-value>true</param-value>
+	</init-param>-->
+</servlet>
+
+
+<servlet-mapping>
+    <servlet-name>library</servlet-name>
+    <url-pattern>/library/*</url-pattern>
+</servlet-mapping>
+
+<servlet-mapping>
+    <servlet-name>gs2-library</servlet-name>
+    <url-pattern>/gs2-library</url-pattern>
+</servlet-mapping>
+
+<servlet-mapping>
+    <servlet-name>nzdl-library</servlet-name>
+    <url-pattern>/nzdl</url-pattern>
+</servlet-mapping>
+
+<servlet-mapping>
+    <servlet-name>gateway</servlet-name>
+    <url-pattern>/gateway</url-pattern>
+</servlet-mapping>
+
+<servlet-mapping>
+    <servlet-name>basic-library</servlet-name>
+    <url-pattern>/basic-library</url-pattern>
+</servlet-mapping>
+
Index: /main/trunk/greenstone3/web/WEB-INF/web.xml
===================================================================
--- /main/trunk/greenstone3/web/WEB-INF/web.xml	(revision 29686)
+++ /main/trunk/greenstone3/web/WEB-INF/web.xml	(revision 29687)
@@ -1,3 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
+<!DOCTYPE web-xml [
+	<!ENTITY servlets-config SYSTEM "servlets.xml">
+]>
 <!-- this is based on a sample web.xml file provided by 
 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/web.xml.txt
@@ -84,138 +87,6 @@
 	</servlet>
   
-  
-	<servlet>
-		<servlet-name>library</servlet-name>
-		<description>The standard gsdl3 library program</description>
-		<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
-		<init-param>
-			<param-name>library_name</param-name>
-			<param-value>library</param-value>
-		</init-param>
-		<init-param>
-			<param-name>site_name</param-name>
-			<param-value>localsite</param-value>
-		</init-param>
-		<init-param>
-			<param-name>interface_name</param-name>
-			<param-value>default</param-value>
-		</init-param>
-		<init-param>
-			<param-name>receptionist_class</param-name>
-			<param-value>DefaultReceptionist</param-value>
-		</init-param>
-		<init-param>
-			<param-name>default_lang</param-name>
-			<param-value>en</param-value>
-		</init-param>
-	</servlet>
-  
-	<servlet>
-		<servlet-name>gs2-library</servlet-name>
-		<description>Greenstone 2 lookalike library program: uses localsite with the gs2 interface</description>
-		<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
-		<init-param>
-			<param-name>library_name</param-name>
-			<param-value>gs2-library</param-value>
-		</init-param>
-		<init-param>
-			<param-name>site_name</param-name>
-			<param-value>localsite</param-value>
-		</init-param>
-		<init-param>
-			<param-name>interface_name</param-name>
-			<param-value>gs2</param-value>
-		</init-param>
-		<init-param>
-			<param-name>default_lang</param-name>
-			<param-value>en</param-value>
-		</init-param>
-		<init-param>
-			<param-name>session_expiration</param-name>
-			<param-value>1800</param-value>
-		</init-param>
-		<init-param>
-			<param-name>params_class</param-name>
-			<param-value>GS2Params</param-value>
-		</init-param>
-	</servlet>
-  
-	<servlet>
-		<servlet-name>nzdl-library</servlet-name>
-		<description>gsdl3 library program</description>
-		<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
-		<init-param>
-			<param-name>library_name</param-name>
-			<param-value>nzdl</param-value>
-		</init-param>
-		<init-param>
-			<param-name>site_name</param-name>
-			<param-value>nzdl</param-value>
-		</init-param>
-		<init-param>
-			<param-name>interface_name</param-name>
-			<param-value>nzdl</param-value>
-		</init-param>
-		<init-param>
-			<param-name>default_lang</param-name>
-			<param-value>en</param-value>
-		</init-param>
-		<init-param>
-			<param-name>params_class</param-name>
-			<param-value>NZDLParams</param-value>
-		</init-param>
-		<init-param>
-			<param-name>session_expiration</param-name>
-			<param-value>600</param-value>
-		</init-param>
-  </servlet>
-
-	<servlet>
-		<servlet-name>gateway</servlet-name>
-		<description>gsdl3 library based on gateway site and basic interface. It uses SOAP to talk to localsite</description>
-		<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
-		<init-param>
-			<param-name>library_name</param-name>
-			<param-value>gateway</param-value>
-		</init-param>
-		<init-param>
-			<param-name>site_name</param-name>
-			<param-value>gateway</param-value>
-		</init-param>
-		<init-param>
-			<param-name>interface_name</param-name>
-			<param-value>basic</param-value>
-		</init-param>
-		<init-param>
-			<param-name>default_lang</param-name>
-			<param-value>en</param-value>
-		</init-param>
-	</servlet>
-  
-	<servlet>
-		<servlet-name>basic-library</servlet-name>
-		<description>basic gsdl3 library program: uses localsite and the basic interface</description>
-		<servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class>
-		<init-param>
-			<param-name>library_name</param-name>
-			<param-value>basic-library</param-value>
-		</init-param>
-		<init-param>
-			<param-name>site_name</param-name>
-			<param-value>localsite</param-value>
-		</init-param>
-		<init-param>
-			<param-name>interface_name</param-name>
-			<param-value>basic</param-value>
-		</init-param>
-		<init-param>
-			<param-name>default_lang</param-name>
-			<param-value>en</param-value>
-		</init-param>
-		<!--<init-param>
-			<param-name>allow_client_side_xslt</param-name>
-			<param-value>true</param-value>
-		</init-param>-->
-	</servlet>
+	<!-- See servlets.xml -->
+	&servlets-config;
 
 	<!-- axis servlets -->
@@ -313,32 +184,8 @@
 
 	<servlet-mapping>
-		<servlet-name>nzdl-library</servlet-name>
-		<url-pattern>/nzdl</url-pattern>
-    </servlet-mapping>
-	<servlet-mapping>
 		<servlet-name>tester</servlet-name>
 		<url-pattern>/testing</url-pattern>
 	</servlet-mapping>
   
-	<servlet-mapping>
-		<servlet-name>library</servlet-name>
-		<url-pattern>/library/*</url-pattern>
-	</servlet-mapping>
-
-	<servlet-mapping>
-		<servlet-name>gs2-library</servlet-name>
-		<url-pattern>/gs2-library</url-pattern>
-	</servlet-mapping>
-  
-	<servlet-mapping>
-		<servlet-name>gateway</servlet-name>
-		<url-pattern>/gateway</url-pattern>
-	</servlet-mapping>
-  
-	<servlet-mapping>
-		<servlet-name>basic-library</servlet-name>
-		<url-pattern>/basic-library</url-pattern>
-	</servlet-mapping>
-
 	<servlet-mapping>
 		<servlet-name>grabtext</servlet-name>
