Application stuff

May 2, 2007 · By Gert Franz · No Comments

Railo 1.1 offers a new way of handling and more flexibility with auto include files. Auto include files for CFMX are application.cfm, application.cfc and onRequestEnd.cfmIn the Railo administrator you will find a new Menu entry labelled "Application" which takes care of the following: Script protect, Request Timeout and Applicaion listener. The application listener will allow you to define the type and the mode of auto include files. The following options are available:
Type of application listeners:
NoneNo auto include file will be executed
Classic CFML < 7Only Application.cfm and OnRequestEnd.cfm will be executed.
ModernOnly Application.cfc will be included
MixedIf Application.cfc is not found, Application.cfm and OnRequestEnd.cfm will be executed.

Searching for the auto include files can consume time, since wich each request some file and directory operations are necessary. So you can improve performance by applying only the rule you see fit.
Mode of application listeners:
CurrentLooks for the auto include files only in the current (called) directory
RootLooks for the auto include files only in the webroot directory
CurrToRootCFML standard. This setting looks for the files from the current directory up to the root
By playing with these settings you sure can gain a little performance. Important to note is, that Railo handles mappings like directories. So you could define for instance three different mappings like:
/myApp/custom/templatesd:\custom_files\templates
/myApp/customd:\custom_root
/myAppd:\myApp
/d:\projects\webApplication
Now, when you execute a template that can be reached with the URL http://.../myapp/custom/templates/myTemplate.cfm, Railo scans the following directories for auto include in the following order:
  1. d:\custom_files\templates
  2. d:\custom_root
  3. d:\myApp
  4. d:\projects\webApplication
And not first in d:\custom_files\templates and then in d:\custom_files and then in d:\! Other engines do it in exact this way. This could cause unexpected problems. If for instance somebody places an Application.cfm into the folder D:\ then an Application.cfm in the webroot will never would be considered when a file from the mapping /myApp/custom/templates would be called.

Tags: Features · New release · Performance · Railo 1.1

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment

Leave this field empty: