You are here: Foswiki>ELabs Web>HowELabsWork (2018-04-05, JoelG)Edit Attach

Developer's Guide to the e-Lab Webapps

The e-Labs are JSP webapps, served by Tomcat from the i2u2-prod VM, with a development backup on i2u2-dev.


See entry: Tomcat

Tomcat can be a complex installation. The "business" directory that the e-Lab files are served from, though, is

Ubuntu 14.04 /var/lib/tomcat{X}/

This is what we symlink ~quarkcat/sw/tomcat to on the VMs and in the local development setup. Tomcat has a standard directory configuration where individual webapps are stored in self-contained folders within the /var/lib/tomcat{X}/webapps/ directory. In our case,
├── css
├── elab
├── graphics
├── ilab
└── ROOT
[Online documentation often refers to .war files within the webapps/ folder. This is an alternate way of packaging a webapp that we don't use.]

The name of a webapp's folder defines what's referred to as its "Context" for JSP code. Under normal configuration, Tomcat makes a directory webapps/myapp/ available as In our case, the elab/ and ilab/ webapps are accessible as and, respectively. The webapps/ROOT/ directory is Tomcat's pre-installed default webapp, what Tomcat returns when it receives a request like with no webapp directory given. By default, if no file is specified in the URL, Tomcat looks for an index.html or index.jsp file. Thus, requests for return webapps/ROOT/index.html, which is the e-Labs home page.

Our use of the webapps/ directory is a bit idiosyncratic. We keep the front page of the site in the default webapps/ROOT/index.html, but we serve the rest from the webapps/elab/ directory. In addition, the directories webapps/css/ and webapps/graphics/ are not webapps and are not directly web-accessible (a directory within webapps/ must have a WEB-INF/web.xml file in order for Tomcat to recognize it as a webapp). I believe (Joel) that it's not standard practice to keep such resources directly in the webapps/ folder.


The e-Labs are, fundamentally, Java code. The source code includes our own package gov.fnal.elab, found in the repo at common/src/java/gov/fnal/elab/ as well as several other libraries.

The file contains parameters used by the e-Labs Java and JSP code. Its existence is meant to make the e-Labs more portable among servers and to facilitate making new e-Labs on an existing setup.

Unfortunately, searching the repostitory for "" turns up multiple files, and none of them are the actual properties file of the relevant server. To alter the properties of an e-Lab on a given server, you must edit


This file does not deploy with the rest of the code base. It must be manually placed on each new e-Lab server and edited in situ.

-- Main.JoelG - 2017-03-09


Topic revision: r4 - 2018-04-05, JoelG
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback