Java Application Server Setup

Java Application Server Setup

To set up your application server, press the Config button next to it. If you have multiple servers, you can set them up together or one by one. Here’s how:

Step 1: Open the drop-down menu at the top of the configuration tab to see a list of all your app servers.

Multiple nodes/server

Step 2: Pick the server you want and adjust the settings.

Step 3: To save the changes:

For just the selected server, click Save only for the current instance from the drop-down menu.

For all servers, click Save for all instances.

Save all instances

Note: If you create or rename a file or folder in the Configuration Manager, it will only affect the chosen server. To make the same change on other servers, you must do it manually.

Here is a list of configuration files you can edit for Java application servers:

For details on which settings can be changed in the config folders, refer to these descriptions:

SERVER

You can configure the main Java servlet container settings in the server folder.

Here are some actions you can perform with these files:

  • context.xml: Set up session replication with Memcached.
  • web.xml: Set up remote access with WebDav.
  • server.xml: Enable multiple domains.
  • variables.conf:
    • Set memory settings for your Java containers with custom GC, -Xmx, and -Xms parameters. Use each parameter on a new line

Xmx<size>m
Xms<size>m
    • Set custom system properties for Tomcat, TomEE, Jetty, or GlassFish:

Dvar1=value1 -Dvar2=value2
Dmy.var3=/my/value
    • Configure JavaAgent interceptor
    • Enable remote debugging

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

variables.conf

Note: This file is only available for Tomcat and TomEE. To configure a GlassFish server, use the Admin Panel.

HOME

If you need custom files or folders to configure your application, you can download or create them in the home directory of your Java server.

Then, you can point to these files in the variables.conf file located in the server folder.

Note: The directory might be named “temp” on some servers, but the platform never automatically cleans it.

Temp

WEBAPPS / WORK

The webapps folder (for Tomcat/TomEE) and the work folder (for Jetty) store unpacked applications deployed to the environment.

webapps

JAVA_HOME

The JAVA_HOME folder holds Java config files and libraries. You can edit Java settings and upload extra Java libraries here.

JAVA_HOME

LIB

The lib folder is for storing default and custom jar libraries.

LIB folder

CRON

App servers have a cron folder with a config file for setting up cron jobs. For more details, see the Setting Up a Cronjob document.

CRON file

KEYS

The keys folder is where you upload private keys needed for your application. Generate the key, save it as a file, and upload it to this folder. You can use it by specifying the path to your key:


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

Keys folder

CONTEXTS

The contexts folder contains XML config files for each deployed context, and you can edit all these files.

SERVER_LIB

The server_lib folder is the GlassFish config directory with all the server libraries.

APPS

The apps folder in TomEE stores unpacked EE applications deployed to the environment.

Tomcat

Folder File Path
conf catalina.policy
catalina.properties
context.xml
jaspic-providers.xml
jaspic-providers.xsd
jelastic-ha.xml
jelastic-ssl.xml
logging.properties
server.xml
tomcat-env.sh
tomcat-users.xml
tomcat-users.xsd
variables.conf
web.xml
/opt/tomcat/conf
temp /opt/tomcat/temp
webapps /opt/tomcat/webapps
latest /usr/java/latest
lib /opt/tomcat/lib
cron tomcat /var/spool/cron
keys /var/lib/jelastic/keys

TomEE

Folder File Path
server catalina.policy
server.xml
catalina.properties
tomcat-users.xml
context.xml
web.xml
variables.conf
logging.properties
tomee.xml
system.properties
/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 tomcat /var/spool/cron
keys /var/lib/jelastic/keys

GlassFish

Folder File Path
server default-web.xml
domain.xml
domain.xml.bak
domain.xml.orig
local-password
logging.properties
logging.properties.orig
login.conf
server.policy
sun-acc.xml
wss-server-config-1.0.xml
wss-server-config-2.0.xml
/opt/glassfish3/glassfish/domains/
domain1/config
gfcluster-config (in server folder) logging.properties /opt/glassfish3/glassfish/domains/
domain1/config/gfcluster-config
home /opt/glassfish3/temp
JAVA_HOME /usr/java/latest
server_lib /opt/glassfish3/glassfish/lib/
cron glassfish /var/spool/cron
keys /var/lib/jelastic/keys

Jetty

Folder File Path
server jdbcRealm.properties
jetty-ajp.xml
jetty-bio.xml
jetty-jaas.xml
jetty-jmx.xml
jetty-logging.xml
jetty-plus.xml
jetty-rewrite.xml
jetty-setuid.xml
jetty-sslengine.xml
jetty-ssl.xml
jetty-stats.xml
jetty.xml
login.conf
login.properties
realm.properties
spnego.properties
variables.conf
webdefault.xml
/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 jetty /var/spool/cron
keys /var/lib/jelastic/keys