Index: /main/trunk/greenstone3/build.properties.svn
===================================================================
--- /main/trunk/greenstone3/build.properties.svn	(revision 37136)
+++ /main/trunk/greenstone3/build.properties.svn	(revision 37137)
@@ -7,12 +7,12 @@
 # sitting in front of Tomcat, then uncomment the following and set accordingly
 #
-# It is unlikely that you will need to explicity set 'revproxy.port', given the main point
-# of a reverse-proxy web server is to provide a cleaner (hardened) URL for users to access
+# It is unlikely that you will need to explicity set 'revproxy.opt_port', given the main point
+# of a reverse-proxy web server is to provide a cleaner (hardened) URL for users to access.
 # It is included for completeness.
 #
-# If you do not text 'revproxy.context' then it will default to 'greenstone3.context'
+# If you do not set 'revproxy.context' then it will default to 'greenstone3.context'
 #revproxy.protocol=https
-#revproxy.server=<mydomain.org>
-##revproxy.port=8080
+#revproxy.domain=<mydomain.org>
+##revproxy.opt_port=8080
 ##revproxy.context=/greenstone3
 
Index: /main/trunk/greenstone3/build.xml
===================================================================
--- /main/trunk/greenstone3/build.xml	(revision 37136)
+++ /main/trunk/greenstone3/build.xml	(revision 37137)
@@ -1216,8 +1216,8 @@
   
   <target name="get-revproxy-servlet-url">
-    <if><bool><isset property="revproxy.port"/></bool>
-    <property name="revproxy.optport" value=":${revproxy.port}"/>
+    <if><bool><isset property="revproxy.opt_port"/></bool>
+    <property name="revproxy.colon_opt_port" value=":${revproxy.opt_port}"/>
     <else>
-      <property name="revproxy.optport" value=""/>
+      <property name="revproxy.colon_opt_port" value=""/>
     </else>
     </if>
@@ -1230,5 +1230,5 @@
 
     
-    <echo>${revproxy.protocol}://${revproxy.server}${revproxy.optport}${revproxy.app.path}${server.default.servlet}</echo>
+    <echo>${revproxy.protocol}://${revproxy.domain}${revproxy.colon_opt_port}${revproxy.app.path}${server.default.servlet}</echo>
   </target>
 
@@ -1253,5 +1253,5 @@
 
   <target name="get-external-servlet-url">      
-    <if><bool><isset property="revproxy.server"/></bool>
+    <if><bool><isset property="revproxy.domain"/></bool>
       <antcall target="get-revproxy-servlet-url"/>
       <else>
@@ -1903,4 +1903,8 @@
     <filter token="gsdl3writablehome" value="${src.gsdl3.writablehome.unix}"/>
     <filter token="gsdl3version" value="${app.version}"/>
+    <filter token="revproxy.protocol" value="${revproxy.protocol}"/>
+    <filter token="revproxy.domain"   value="${revproxy.domain}"/>
+    <filter token="revproxy.opt_port" value="${revproxy.opt_port}"/>
+    <filter token="revproxy.context"  value="${revproxy.context}"/>
     <filter token="server.protocols" value="${server.protocols}"/>
     <filter token="default.server.protocol" value="${default.server.protocol}"/>
Index: /main/trunk/greenstone3/resources/web/global.properties.svn
===================================================================
--- /main/trunk/greenstone3/resources/web/global.properties.svn	(revision 37136)
+++ /main/trunk/greenstone3/resources/web/global.properties.svn	(revision 37137)
@@ -31,4 +31,10 @@
 tomcat.server.IPregex=@tomcat.server.IPregex@
 
+## Reverse Proxy Settings
+revproxy.protocol=@revproxy.protocol@
+revproxy.domain=@revproxy.domain@
+revproxy.opt_port=@revproxy.opt_port@
+revproxy.context=@revproxy.context@
+
 
 ## Proxy setup - set these if you are behind a firewall and you want services that access the internet
Index: /main/trunk/greenstone3/web/interfaces/default/transform/layouts/header-vars.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/layouts/header-vars.xsl	(revision 37136)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/layouts/header-vars.xsl	(revision 37137)
@@ -22,3 +22,16 @@
   </xsl:variable>
 
+  <xsl:variable name="servletProtocol">
+    <xsl:value-of select="/page/pageResponse/interfaceOptions/option[@name = 'servlet_protocol']/@value"/>
+  </xsl:variable>
+  <xsl:variable name="servletDomain">
+    <xsl:value-of select="/page/pageResponse/interfaceOptions/option[@name = 'servlet_domain']/@value"/>
+  </xsl:variable>
+  <xsl:variable name="servletOptPort">
+    <xsl:value-of select="/page/pageResponse/interfaceOptions/option[@name = 'servlet_opt_port']/@value"/>
+  </xsl:variable>
+  <xsl:variable name="servletContext">
+    <xsl:value-of select="/page/pageResponse/interfaceOptions/option[@name = 'servlet_context']/@value"/>
+  </xsl:variable>
+  
 </xsl:stylesheet>
