Chapter 2: Writing Your First ColdFusion Application
Saving Application Pages
Instead of saving pages with an HTM or HTML file extension, you save ColdFusion
application pages with a CFM or CFML extension. By default, the Web server knows to
pass a page that contains a CFM extension to the ColdFusion Server when it is
requested by a browser.
Save ColdFusion application pages underneath the Web root or another Web server
mapping so that the Web server can publish these pages to the Internet. For example,
you might want to create a directory
To save the page:
1.
Select File > Save.
2.
Save your page as
For example, the directory path on your machine may be:
c:/inetpub/wwwroot/myapps
<mywebserverdocroot>/myapps
Viewing Application Pages
You view the application page on the Web server to ensure that the code is working as
expected. Presently, your page is very simple. But, as you add more code, you will want
to ensure that the page continues to work.
To view the page in a local browser:
1.
Open a Web browser on your local machine and enter the following URL:
http://127.0.0.1/myapps/calldept.cfm
Where
pages locally.
2.
Use the Web browser facility that allows you to view a page's source code to
examine the code that the browser uses for rendering.
Note that only HTML and text is returned to the browser.
calldept.cfm
on Windows NT or
refers to the localhost and is only valid when you are viewing
127.0.0.1
and save your practice pages there.
myapps
in
under the Web root directory.
myapps
on UNIX
11
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?