System information

Working with ColdFusion pages 17
Saving your ColdFusion page
In order for the ColdFusion server to process the page, you must save the ColdFusion page on a
computer where the ColdFusion MX is installed. If you are creating your pages on a local server
(on which ColdFusion is running), you can save the pages locally; if you are using a remote server,
you must save your pages on that server.
If you are using the ColdFusion MX J2EE configuration, you typically save ColdFusion pages
under the ColdFusion web application root. For example, in the default directory structure when
you use the J2EE configuration with JRun, you save pages under jrun_root/servers/cfusion/
cfusion-ear/cfusion-war. When you use JRun, you can also run the Web Server Configuration
Tool and save pages under your web root directory.
Tip: ColdFusion MX on Macintosh OS X uses the J2EE configuration.
To save the code that you typed to create a ColdFusion page:
1.
Create a directory called test under the web_root or web_application_root directory.
2.
In the test directory, save the file as cfpage.cfm.
Browsing your code
To ensure that the code you wrote is working as expected, you must view the ColdFusion page in
a browser. The following procedure describes how to view the ColdFusion page that you created
earlier.
To view the ColdFusion page:
1.
Open a web browser and go to the following URL:
http://localhost/test/cfpage.cfm
Note: If you are using the built-in web server, specify the port to use in the URL as follows:
http://localhost:8500/test/cfpage.cfm.
The address localhost is only valid when you view pages locally. The URL for a remote site
would include the server name or IP address of the server where ColdFusion is installed; for
example, http://<serveripaddress>/test/cfpage.cfm.
If you are using the ColdFusion MX J2EE configuration, you may also need to include a
context root in the URL; for example, http://<server>/<context-root>/<page>.cfm. For
example, if you deploy an EAR file and use the default context root of cfmx, you specify http:/
/localhost/cfmx/test/cfpage.cfm.