2.3. Filesystem Paths

2.3.1. Filesystem Paths

JBoss EAP 6 uses logical names for a filesystem paths. The domain.xml, host.xml and standalone.xml configurations all include a section where paths can be declared. Other sections of the configuration can then reference those paths by their logical name, avoiding the declaration of the absolute path for each instance. This benefits configuration and administration efforts as it allows specific host configurations to resolve to universal logical names.
For example, the logging subsystem configuration includes a reference to the jboss.server.log.dir path that points to the server's log directory.

Example 2.10. Relative path example for the logging directory

<file relative-to="jboss.server.log.dir" path="server.log"/>
JBoss EAP 6 automatically provides a number of standard paths without any need for the user to configure them in a configuration file.

Table 2.2. Standard Paths

Value Description
jboss.home.dir The root directory of the JBoss EAP 6 distribution.
user.home The user home directory.
user.dir The user's current working directory.
java.home The Java installation directory
jboss.server.base.dir The root directory for an individual server instance.
jboss.server.data.dir The directory the server will use for persistent data file storage.
jboss.server.config.dir The directory that contains the server configuration.
jboss.server.log.dir The directory the server will use for log file storage.
jboss.server.temp.dir The directory the server will use for temporary file storage.
jboss.controller.temp.dir The directory the host controller will use for temporary file storage.
Override a Path

If you are running a standalone server, you can override the jboss.server.base.dir, jboss.server.log.dir, or jboss.server.config.dir paths in one of two ways.

  1. You can pass arguments on the command line when you start the server. For example:
    bin/standalone.sh -Djboss.server.log.dir=/var/log
  2. You can modify the JAVA_OPTS variable in the server configuration file. Open the EAP_HOME/bin/standalone.conf file and add the following line at the end of the file:
    JAVA_OPTS="$JAVA_OPTS Djboss.server.log.dir=/var/log"
Path overrides are not supported for servers running in a managed domain.

Add a Custom Path

You can also create your own custom path. For example, you may want to define a relative path to use for logging:

my.relative.path=/var/log
You can then change the log handler to use my.relative.path,