The previous examples are fine if the code was always on that server, but what if we wanted to move our code to another server, or even worse, if that new server had a different operating system? Also, what would happen if we wanted to move the location of the logs to another disk (for example, if it was getting too big)?
This is where the idea of mappings comes in. Mappings in Railo Server are ways to create a shortcut to a folder on another part of the server. This makes your code more portable.
For example, imagine if we had an application that wrote to a specific file (or read files from a specific directory) such as C:\MyApplication\MyLogfiles\usercount.txt
and we had that path written all over our code. It would then be a nightmare of searching and replacing throughout our code to change that. With mappings, we can create a link in the Railo Server Administrator and manage the location of this file outside our code. Let's do this for our log file.