Accessibility

Table of Contents

Setting up a ColdFusion development environment for Dreamweaver

Define a ColdFusion site in Dreamweaver

When you define a ColdFusion site in Dreamweaver, you can specify the location of the site files on your hard disk as well as on a remote server running ColdFusion (for users). You can also specify the method for moving files and folders between the two locations. However, if you're interested only in setting up a personal development environment, and ColdFusion is running on your local computer, then you don't need to specify a remote server for your site yet.

Topics covered in this section:

Specify your working folder

To specify your working folder:

  1. In Dreamweaver, select Site > Manage Sites. In the Manage Sites dialog box, click the New button, and then select Site. The Site Definition dialog box appears.
  2. If the Basic tab is showing, click the Advanced tab.
  3. In the Site Name text box, enter a name for your web application, such as Web app tutorial. This name identifies the project in Dreamweaver.
  4. Click the folder icon next to the Local Root Folder text box and browse to the root folder you created for your application in the previous step, Create a root folder for your application, and then click Select.

    If you used the suggestion in this tutorial, then the folder is a follows:

    Windows: \ColdFusion8\wwwroot\MyWebApp

    Macintosh: /Applications/ColdFusion8/wwwroot/MyWebApp

  5. In the HTTP Address text box, enter the URL you would enter in a web browser to open your web application. For example, if you follow the folder naming suggestions in this tutorial, then the HTTP address is as follows:

    http://localhost:8500/MyWebApp/

    Note: For more information, see Test the ColdFusion server.

Leave the Site Definition dialog box open. You will specify your testing server next.

Specify a testing server for Dreamweaver

In this section, you specify a testing server that Dreamweaver can use at design time. Because Dreamweaver does not have an internal ColdFusion server, it needs to use an external ColdFusion server to generate and display dynamic content in Design view and to connect to databases while you work. The testing server you specify in this tutorial is the ColdFusion server you installed on your local computer.

  1. In the advanced Site Definition dialog box, click Testing Server in the Category list. The Testing Server screen appears.
  2. Select ColdFusion from the Server Model pop-up menu.
  3. Select Local/Network from the Access pop-up menu. Dreamweaver displays the folder you specified in the Local Info category. Leave the folder unchanged.
  4. In the URL Prefix text box, enter the URL you would enter in a web browser to request a page in your web application.

    To display live data in your pages while you work, Dreamweaver creates a temporary file, copies it to the designated folder on the server, and attempts to request it using the URL prefix.

    Dreamweaver makes a best guess at the URL prefix based on the information you provided in the Site Definition dialog box. However, the suggested URL prefix may be incorrect. Correct or enter a new URL prefix if the suggestion in Dreamweaver is incorrect. For example, if you follow the folder naming suggestions in this tutorial, then the correct URL prefix is as follows:

    http://localhost:8500/MyWebApp/

    The URL prefix should always specify a folder rather than a particular page on the site. Also, be sure to use the same capitalization you used when you created the folder.

  5. Click OK to define the site and dismiss the Site Definition dialog box, then click Done to dismiss the Manage Sites dialog box.

You can start developing your own ColdFusion web applications in Dreamweaver. The following section describes how to set up the sample ColdFusion files included with this article.

Copy the sample ColdFusion files

If you like, you can copy the sample files included with this article to the working folder on your hard disk. Copying the sample files and connecting to the sample database (described in the following section) also sets up the files for a follow-up tutorial, Developing a web application with Dreamweaver, in the Dreamweaver Developer Center:

  1. Download and unzip the samples file included with this article.
  2. Paste the folders and files in the cafe_cf folder into the application root folder you specified when defining the Dreamweaver site.

    Example:

    /MyWebApp/
        assets/
        data/
        send.cfm
        view.cfm

The Dreamweaver site is now defined and the sample files installed. The next step is to connect to the sample database included in the sample files.