"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

Deploying Elda In Web Containers

This is designed for those who wish to deploy elda to a J2EE container, like Tomcat or Glassfish.

Deploying Elda in Tomcat

Note : Based on Windows XP
  • Download the standalone jar
  • If you know how to extract the webapp from the jar - then do so with your favourite compression utility if not - follow on.
  • Start Elda from the command line using:
    java -jar elda-VERSION.jar
  • The self-unpacking jar creates a directory that contains a webapps/elda directory
  • Copy the /elda directory into Tomcat webapps directory
  • Start tomcat
  • Test the Elda deployment by point your browser to the LDA URIs: #Test_URLs

Deploying Elda in Glassfish

  • Download the web archive (WAR) file from our build system :
  • Extract the elda.war
  • Edit the web.xml file in the elda/WEB-INF directory and delete the servlet mapping below:
    <servlet-mapping> 
       <servlet-name>default</servlet-name> 
       <url-pattern>/docs/*</url-pattern> 
    </servlet-mapping>

  • Log on to Glassfish > Deploy an Application
gf2.jpggf3.jpggf1.jpg
  • Browse to the war file to upload onto Glassfish server > Click on 'OK'
  • Test the Elda depoyment by pointing your browser to the LDA URI's: #Test_URLs

Deploying Elda in Unix

  • Copy and extract the standalone jar into a temp folder.
  • In the extracted contents, navigate to webapps/elda. The folder contents the web application which we will use to deploy into tomcat.
  • Copy the folder elda into the webapps folder of the $TOMCAT_INSTALLATION/webapps/
  • Tomcat Web Application Deployment should be configured to auto deploy web applications. (See http://tomcat.apache.org/tomcat-6-doc/deployer-howto.html)

Configuring Tomcat6

  • Ensure that the AJP 1.3 Connector is enabled on port 8009:
    • Edit $TOMCAT_INSTALLATION/conf/server.xml :
      <!-- Define an AJP 1.3 Connector on port 8009 -->
      <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Configuring Apache2

  • Locate Apache virtual host configuration :
    ls -l /etc/apache2/sites-enabled/000-default lrwxrwxrwx 1 root root 26 2009-02-17 15:36 /etc/apache2/sites-enabled/000-default -> ../sites-available/default
  • Edit /etc/apache2/sites-available/default
    • After Directory, insert/edit the following:
      ProxyPreserveHost On
       ProxyRequests Off
       <Proxy *>
       Order deny,allow
       Allow from all
       </Proxy>
      
       #Tomcat Manager
       ProxyPass /manager ajp://localhost:8009/manager
       ProxyPassReverse /manager ajp://localhost:8009/manager
      
       ProxyPass /elda ajp://localhost:8009/elda
       ProxyPassReverse /elda ajp://localhost:8009/elda
  • Restart Tomcat 6 and Apache2
    • sudo service tomcat6 restart
    • sudo service apache2 restart

OS OpenSpace API key

  • In one of Elda's example (/elda/api/education/schools.html), the xslt driven HTML formatter uses a mapping from Ordnance Survey OpenSpace API.. The key provided in the jar only works for localhost. If you wish to use these OpenLayers with Elda, you would have to request for a separate API key. This can be done here.
  • Once you have obtained the key, you can replace it in $TOMCAT_INSTALLATION/webapps/elda/xsltsheets/ashtml.xsl.
  • NOTE: This change is solely done for that the Elda example (requests) running the webapp outside of localhost. If you do not wish to use OS OpenSpace, these steps are unnecessary. Other mapping solutions such as GoogleMaps can also be implemented.

Debugging using Apache log4j

  • The file is located In $TOMCAT_INSTALLATION/elda/log4j.properties, The default configuration is set to display warnings to stderr (Standard error stream). Update it accordingly if you wish for it to display more debugging information.
  • The reference can be found here.

Test URLs

Topic revision: r8 - 21 Feb 2012, JacquelineGithaiga
 

Current license: All material on this collaboration platform is licensed under a Creative Commons Attribution 3.0 Australia Licence (CC BY 3.0).