Index: /main/trunk/package-kits/linux/files/greenstone3.xml
===================================================================
--- /main/trunk/package-kits/linux/files/greenstone3.xml	(revision 29643)
+++ /main/trunk/package-kits/linux/files/greenstone3.xml	(revision 29644)
@@ -2,5 +2,6 @@
          docBase="%WEB%"
          reloadable="true"
-         privileged="true">
+         privileged="true"
+         xmlBlockExternal="false">
     <Realm className="org.apache.catalina.realm.JDBCRealm" 
            driverName="org.apache.derby.jdbc.EmbeddedDriver"
Index: /main/trunk/package-kits/linux/files/servlets.xml
===================================================================
--- /main/trunk/package-kits/linux/files/servlets.xml	(revision 29644)
+++ /main/trunk/package-kits/linux/files/servlets.xml	(revision 29644)
@@ -0,0 +1,133 @@
+<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>
Index: /main/trunk/package-kits/linux/files/web.xml.external.patch
===================================================================
--- /main/trunk/package-kits/linux/files/web.xml.external.patch	(revision 29644)
+++ /main/trunk/package-kits/linux/files/web.xml.external.patch	(revision 29644)
@@ -0,0 +1,153 @@
+--- web/WEB-INF/web.xml.orig	2014-12-18 17:16:57.474986762 +1300
++++ web/WEB-INF/web.xml	2014-12-18 17:19:10.147038499 +1300
+@@ -1,4 +1,7 @@
+ <?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
+ -->
+@@ -83,140 +86,8 @@
+ 		<servlet-class>org.greenstone.gsdl3.ClientSideServlet</servlet-class>
+ 	</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 -->
+ 	<servlet>
Index: /main/trunk/package-kits/linux/packages/greenstone
===================================================================
--- /main/trunk/package-kits/linux/packages/greenstone	(revision 29643)
+++ /main/trunk/package-kits/linux/packages/greenstone	(revision 29644)
@@ -14,7 +14,9 @@
     greenstone
     wvWare
+    servlets.xml
     perl-util.patch
     gs2build.patch
     servlets.patch
+    web.xml.external.patch
     gsdl3site.cfg.patch
     global.properties.patch
Index: /main/trunk/package-kits/linux/segments/main
===================================================================
--- /main/trunk/package-kits/linux/segments/main	(revision 29643)
+++ /main/trunk/package-kits/linux/segments/main	(revision 29644)
@@ -1,6 +1,7 @@
 install_greenstone:
-	install -d $(DESTDIR)/$(web)
+	install -d $(DESTDIR)/$(web)/WEB-INF
 	install -dm775 $(DESTDIR)/$(tomcatlib)
 	rsync -a --info=STATS --exclude sites/localsite/collect/ --exclude .svn src/web/ $(DESTDIR)/$(web)/
 	mv $(DESTDIR)/$(web)/WEB-INF/lib/derby.jar $(DESTDIR)/$(tomcatlib)
 	install -Dm644 greenstone3.xml $(DESTDIR)/$(tomcatconf)/greenstone3.xml
+	install -Dm644 servlets.xml $(DESTDIR)/$(web)/WEB-INF/servlets.xml
