Configuration:directory_placeholders - getrailo/railo GitHub Wiki

Table of Contents

Directory Placeholders

In order to make configuring Railo a little easier, there are several constants (we call them "directory placeholders") that contain a certain value which might change depending on the system, the environment or the context.

Available Directory Placeholders

Here are the available placeholders in Railo:

Directory Placeholder Description
{railo-web} Path to the Railo web directory, usually {web-root}/WEB-INF/railo.
{railo-server} Path to the Railo server directory, usually where the railo.jar is located.
{railo-config} This is the same as {railo-server} in server context and the same as {railo-web} in web context.
{temp-directory} Path to the temp directory of the current user of the system.
{home-directory} Path to the home directory of the current user of the system.
{web-root-directory} Path to the web root.
{system-directory} Path to the system directory.
{web-context-hash} Hash of the web context.
{web-context-label} A label for the web context. See A note on {web-context-label} below.

Directory Placeholders in CFML

You can reference the directory placeholders in your CFML code like this:

<cfdump var="#expandPath('{railo-web-root}')#">

A note on {web-context-label}

If you have configured Railo to generate the configuration directories using the {web-context-hash}, you may have wished that the resulting hashed directories were a little more readable. You'll end up with a list of directories named with a hash value that is 32 bytes long. This is far from readable.

Therefore, in Railo 3.3, we introduced a new directory placeholder: {web-context-label}. Now you have the opportunity to use a label as a path to the configuration files for each web context. In order to use this label, you need to define it in every railo-web.xml.cfm in every configuration directory.

As of Railo 4.0.2.002 final, you can update the {web-context-label} through the Server Administrator. After you've logged in to [domain]/railo-context/admin/server.cfm, you will see a section marked "Web Contexts" at the bottom of the page. Here you can modify your labels and click the update button to save the changes.

⚠️ **GitHub.com Fallback** ⚠️