Java App Server Configuration

Java Application Server Configuration

The platform Configuration Manager provides direct access to editable files and folders for Tomcat, TomEE, GlassFish, and Jetty application servers. In multi-node environments, configuration changes can be applied to one selected instance or saved across all instances.

Configure One or All Application Servers

  1. Click Config beside the required Java application-server layer.
  2. Open the instance drop-down at the top of the configuration tab.
  3. Select the application-server node that should be edited.
  4. Make the required changes.
  5. Choose Save only for current instance to update only the selected node, or click Save to apply the edited file across all application servers.
Select a Java application-server instance
Select the application-server instance from the configuration-tab drop-down.
Save configuration for the current instance
Save the file for the selected instance only, or apply it to all nodes.
!

File and folder creation limitation

Creating or renaming a file or folder is applied only to the selected node. Repeat that structural change manually on the other nodes.

Configuration Folders

FolderPurpose
serverMain servlet-container configuration files.
homeStorage for custom files and folders referenced by the application or variables.conf.
webapps / workStores unpacked applications for Tomcat/TomEE and Jetty.
JAVA_HOMEContains Java configuration files and Java libraries.
libStores default and custom JAR libraries.
cronContains the application-server cron configuration file.
keysStores private-key files required by applications.
contextsContains editable XML configuration files for deployed Jetty contexts.
server_libGlassFish server-library directory.
appsStores unpacked enterprise applications deployed to TomEE.

The platform key directory can be referenced with:

/var/lib/jelastic/keys/{key_file_name}

Server Configuration

The main Java servlet-container settings are stored in the server folder. Common examples include:

  • context.xml — session-replication configuration.
  • web.xml — application defaults and WebDAV configuration.
  • server.xml — connectors, hosts, and multiple-domain configuration.
  • variables.conf — JVM memory, system properties, Java agents, and remote debugging.

Memory Settings

-Xmx<size>m
-Xms<size>m

Custom System Properties

-Dvar1=value1
-Dvar2=value2
-Dmy.var3=/my/value

Remote Debugging

-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address={port_number}
i

variables.conf availability

The documented variables.conf workflow is available for Tomcat and TomEE. Configure GlassFish through its Admin Panel.

Java server configuration files
Edit JVM and server settings through the application-server configuration manager.

Application-Server Paths

Tomcat

FolderPath
conf / server/opt/tomcat/conf
temp / home/opt/tomcat/temp
webapps/opt/tomcat/webapps
JAVA_HOME/usr/java/latest
lib/opt/tomcat/lib
cron/var/spool/cron
keys/var/lib/jelastic/keys

TomEE

FolderPath
server/opt/tomcat/conf/
home/opt/tomcat/temp
webapps/opt/tomcat/webapps
apps/opt/tomcat/apps
JAVA_HOME/usr/java/default
lib/opt/tomcat/lib
cron/var/spool/cron
keys/var/lib/jelastic/keys

GlassFish

FolderPath
server/opt/glassfish3/glassfish/domains/domain1/config
gfcluster-config/opt/glassfish3/glassfish/domains/domain1/config/gfcluster-config
home/opt/glassfish3/temp
JAVA_HOME/usr/java/latest
server_lib/opt/glassfish3/glassfish/lib/
cron/var/spool/cron
keys/var/lib/jelastic/keys

Jetty

FolderPath
server/opt/jetty/etc
home/opt/jetty/home
contexts/opt/jetty/contexts/
work/opt/jetty/work
JAVA_HOME/usr/java/latest
lib/opt/jetty/lib
cron/var/spool/cron
keys/var/lib/jelastic/keys

Expected Result

The selected Java application-server files can be edited through Configuration Manager, with file-content changes saved either to one instance or across all instances in the layer.

Important Notes

  • Back up important configuration files before editing them.
  • Creating or renaming files and folders affects only the selected node.
  • Restart or reload the application server when required by the changed setting.
  • Use GlassFish Admin Panel for settings not managed through editable files.
  • Store private keys under /var/lib/jelastic/keys with appropriate access control.