Instead of hardcoding the location of our code, let's create a mapping in the Railo Web Administrator that we are going to use to point to our location.
1. Open up the Railo Web Administrator by browsing to
http://localhost:8888/railo-context/admin/web.cfm
and log in.2. Click on the Mappings link that can be found under the Archives & Resources section on the left.
3. Here you will see the Archives & Resources - Mappings screen.
4. Let's add a mapping to a folder that isn't in our web root; in my example, I am using
/temp/logs
but you can choose anywhere (for example,C:\temporary\logs\
if you are using Microsoft Windows). Add the name of our mapping,/logs
, in the text field under the Virtual column, and then add the path to the folder in the text field under the Resource column:5. Now click on the save button to update this mapping
6. Now that we have created this mapping, let's see how we can use it in our code
7. Create...