Accessibility
 
Home > Products > ColdFusion > Support > Advanced Development
ColdFusion Icon Macromedia ColdFusion Support Center - Advanced Development
Adding a default document type

As part of sending a request URL to ColdFusion MX, you can specify a document name or you can omit it. If you omit the document name, ColdFusion searches the corresponding web directory for a default document. Typically, a default document is named index.cfm or index.htm.

The built-in web server lets you define one or more default documents. When you install ColdFusion, the file web_root\WEB-INF\web.xml contains the following definition for the default documents recognized by the web server:

<welcome-file-list>
	<welcome-file>index.cfm</welcome-file>
	<welcome-file>index.html</welcome-file>
	<welcome-file>index.htm</welcome-file>
</welcome-file-list>

The web server searches first for a file named index.cfm, then index.html, then index.htm. If it does not find one of these files, it displays the directory contents because file browsing is enabled by default. You can turn off file browsing using the procedure shown in Disabling file browsing.

To modify the default document list:

1 In a text editor, open the file web_root\WEB-INF\web.xml.
2 Add the new default document to the existing list.
In this example, you add the document new.htm:
<welcome-file-list>
	<welcome-file>index.cfm</welcome-file>
	<welcome-file>index.html</welcome-file>
	<welcome-file>index.htm</welcome-file>
	<welcome-file>new.htm</welcome-file>
</welcome-file-list>
3 Save the file.
4 Restart the ColdFusion server.
To Table of Contents Back to Previous document Forward to next document