Directory placeholders
When you want to use certain directories in the administrator you have two ways of doing this. Either by absolute or relative addressing. In some cases in mappings you need to access certain directories where you do not know how to retreive them or you have to address them by entering the absolute path to the directory. That's where Railo's directory placeholders are quite handy.If you like to access certain files from certain directories in the administrator you can now use the predefined directory placeholders. These placeholders can be used in any file related option in the railo administrator. Within Railo the following directory placeholders are predefined:
| Railo directory placeholders: | |
| {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) |
| {temp-directory} | Path to the temp directory of the system of the current user |
| {home-directory} | Path to the home directory of the system of the current user |
| {web-root-directory} | Path of the root of the current web |
| {system-directory} | Path to the system directory of the current system |
Just take a look at the railo-context mapping which is defined by default. As you can see in the web administrator, this mapping points to {railo-web}/context/ and even the archive contains a directory placeholder. Railo shows you where the corresponding physical directory is located. Just place your mouse over the mapping definition where the directory placeholder is used and a tooltip displays the logical and the physical pathname.
The cool thing about these placeholders is, that for instance you can set up Railo to start from a CDROM (just use the Railix version) and compile into the temp directory, by setting the deploy directory and all the logfiles into the temp directory:
railo-web.xml
<file-system deploy-directory="{temp-directory}/cfclasses/" ... temp-directory="/WEB-INF/railo/temp/" ...>
</file-system>
<scope
...
cascading="standard"
requesttimeout-log="{temp-directory}/requesttimeout.log"
.../>
You do not need to know where all the directories are located. It works for windows, linux and all other os as well.So you would probably be able to copy an entire web from windows to linux or vice versa and your application would still run with no errors, if you defined everything by using relative paths or by using the Railo directory placeholders.
Note: The directory placeholders are only available in the administrator yet. So you can not use them inside a Railo tag or function.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment