My First Application on ColdFusion MX Server - Creating a Web Page with the CFM Extension, our First ColdFusion Page
(Page 5 of 6 )
Finally we have arrived at our final objective: to create a Web page with the CFM extension and test it in the Web server. In order to create a Web page, copy the following file index.cfm, and save it in the website content directory, MyCFusion whose directory path is: C:\Documents and Settings\computer user\ My Documents\MyCFusion. The index.cfm file is actually a html file with some ColdFusion specific tags. This is very similar to the other server side scripting tags with file extensions such as ASP, JSP, and so on.
<html>
<HEAD>
<TITLE>Test Page</TITLE>
</HEAD>
<BODY>
<h3>This is a test page</h3>
We are testing to verify if this can read a CFM file type when accessed by:
http://localhost/TestingCF<p></p>
<cfset strg="Welcome to ColdFusion MX 6.1">
<cfoutput>
#strg#
</cfoutput>
</BODY>
<html>
When this file is saved in the MyCFusion directory, the index.cfm gets saved in not only MyCFusion, but will also appear in the virtual directory as shown.

Next: ColdFusion Tags CFSET and CFOUTPUT >>
More ColdFusion Articles
More By Jayaram Krishnaswamy