Jetty File Structure

Jetty is very modular and configurable.  It has a small base footprint with the ability to easily enable modules for required functionality; one of its unique features is its layered configuration approach.  

This enables a base Jetty install to be configured without touching any of the files from the install.  We have extended this to three layers.  The upstream Jetty install (<InstallDir>jetty\upstream), the default Percussion configuration (<InstallDir>\jetty\defaults), and the base customer instance specific configuration (<InstallDir>\jetty\base).

 All custom configuration should be done in base <InstallDir>\jetty\base (customer specific configuration directory). The upstream Jetty directory(jetty\upstream) , and Percussion Jetty defaults directory (<InstallDir>\jetty\defaults) should not be modified.  This is to prevent problems on upgrade and to allow for smooth upstream security updates. 

Upgrades and patches will replace the contents of defaults and upstream; the priority of how Jetty loads configuration files is: base, defaults and lastly upstream.  

Jetty functionality Overriding

The modular nature of Jetty allows the overriding of functionality in Jetty, each configuration file in base will override those found in the defaults and upstream directory.  By default, we do not copy over every file from the other two directories into base.  However for custom configuration, those files can be copied to the equivalent base directory from defaults / upstream equivalent locations and changed accordingly.  In situations where you want to configure jetty properties for enabled modules, <InstallDir>/base/etc/installation.properties file can be used to centralized your configuration properties.  

Jetty Override Priority Lowest → Highest

  • upstream
  • defaults
  • base

Other important Jetty directories:

  • jetty/base/attachments 
    •  A temporary attachment storage used by Web Services.
  • jetty/cache  
    • A cache folder used by Percussion, can be be removed when Percussion is stopped
  • jetty/base/etc
    • installation.properties - Contains port configuration and SSL configuration.  
    • perc-ds.xml  - Percussion data source configuration xml file.
    • perc-ds.properties -  Properties that provides details to the Percussion data source xml file and to connection properties.
    • Any custom changes to override configuration in jetty/defaults/etc and jetty/upstream/etc can be placed in here.
  • jetty/base/lib/ext
    • Additional custom instance jar files may be placed here.
  • jetty/base/lib/jdbc 
    • This folder contains the JDBC database drivers that are available on the system for use in datasources.
  • jetty/base/logs 
    • Percussion Log files go in here. 
  • jetty/base/resources 
    • Custom resource files that are added to the class path will be placed in here.  This is also where log4j2.xml should be modified when configuring logging. 
  • jetty/base/start.d  
    • This is where custom enabled jetty modules should be placed, when HTTPS is configured this will contain ssl.ini and https.ini.
  • jetty/base/webapps  
    • Contains any webapps enabled on the server.  Unlike other folders and files under base, the web apps in this directory are overwritten on upgrade and patching.