Adobe® ColdFusion® Configuring and Administering ColdFusion
If this guide is distributed with software that includes an end user agreement, this guide, as well as the software described in it, is
furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such
license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic,
mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. Please note that the content
in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement.
The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a
commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or
inaccuracies that may appear in the informational content contained in this guide.
Any references to company names in sample templates are for demonstration purposes only and are not intended to refer to any actual
organization.
Adobe, the Adobe logo, Acrobat, ColdFusion, Dreamweaver, Flash, FlashPaper, Flex, HomeSite, LiveCycle, and Macromedia are either
registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries.
IBM is a trademark of International Business Machines Corporation in the United States, other countries, or both. Java, Solaris, and
Sun are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Linux is the registered
trademark of Linus Torvalds in the U.S. and other countries. Solaris is a trademark or registered trademark of Sun Microsystems, Inc. in
the United States and other countries. UNIX is a trademark of The Open Group in the US and other countries. Microsoft is either a
registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries. All other trademarks are the
property of their respective owners.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/)
This product contains either BISAFE and/or TIPEM software by RSA Data Security, Inc.
Portions include technology used under license from Autonomy, and are copyrighted.
Verity and TOPIC are registered trademarks of Autonomy.
Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA.
Notice to U.S. Government End Users. The Software and Documentation are “Commercial Items,” as that term is defined at 48 C.F.R.
§2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software Documentation,” as such terms are
used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R. §§227.7202-1
through 227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are
being licensed to U.S. Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end
users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. For U.S.
Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of
Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212),
and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and
60-741. The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference.
Configuring and Administering ColdFusion is intended for anyone who needs to configure and manage their
Adobe® ColdFusion 8 development environment.
About ColdFusion documentation
The ColdFusion 8 documentation is designed to provide support for the complete spectrum of participants.
Documentation set
The ColdFusion documentation set includes the following titles:
BookDescription
1
Installing and Using ColdFusion
Configuring and Administering ColdFusion
ColdFusion Developer’s
Guide
CFML ReferenceProvides descriptions, syntax, usage, and code examples for all ColdFusion tags, func-
Describes system installation and basic configuration for Windows, Macintoch, Solaris,
Linux, and AIX.
Part 1 describes how to manage the ColdFusion environment, including connecting
to your data sources, configuring security for your applications, and monitoring server
activity. Part 2 describes Verity search tools and utilities that you can use for configuring the Verity Search Server engine, as well as creating, managing, and troubleshooting Verity collections.
Describes how to develop your dynamic web applications, including retrieving and
updating your data, using structures, and forms.
tions, and variables.
Viewing online documentation
All ColdFusion documentation is available online in HTML and Adobe Acrobat Portable Document Format
(PDF) files. Go to the documentation home page for ColdFusion on the Adobe website:
www.adobe.com/support/documentation/en/coldfusion/. In addition, you can view the documentation in
LiveDocs, which lets you add comments to pages and view the latest comments added by Adobe, by going to
www.adobe.com/go/livedocs_cf8docs.
CHAPTER 1
2
Introduction
Part 1: Administering ColdFusion
You can use ColdFusion to manage the ColdFusion environment, including using the ColdFusion Administrator,
connecting to your data sources, managing your web server, deploying your applications, and configuring security
for your applications.
Although you use the ColdFusion Administrator to perform most ColdFusion administration tasks, you can also
manage databases, web server configurations, and Verity Search Server.
The ColdFusion Administrator provides a browser-based interface for managing your ColdFusion environment.
You can configure many settings to provide optimal levels of security and functionality. The available options are
based on your edition of ColdFusion 8—Standard or Enterprise—as well as your configuration: server, multiserver, or J2EE. For more information on ColdFusion configurations, see “About the ColdFusion installation” on
page 3 in “Preparing to Install ColdFusion” on page 3 in Installing and Using ColdFusion.
5
The default location for the ColdFusion Administrator login page is:
Where servername is the fully qualified domain name of your web server. Common values for servername are
localhost or 127.0.0.1 (each refers to the web server on the local computer).
If you are using the ColdFusion built-in web server, include the port number as part of the servername. The
default port number for the server configuration is 8500; for example, http://servername:8500/CFIDE/administrator/index.cfm. The default port number for the multiserver configuration is 8300. If you are using the J2EE
configuration, include the port number that the J2EE application server’s web server uses.
If you were using the built-in web server in a version earlier than ColdFusion MX 7 and upgraded to ColdFusion
8, the installer automatically finds an unused port for the built-in web server (typically 8501).
If your ColdFusion Administrator is on a remote computer, use the Domain Name Services (DNS) name or
Internet Protocol (IP) address of the remote host.
To access the ColdFusion Administrator, enter the password specified when you installed ColdFusion.
CHAPTER 2
6
Administering ColdFusion
Note: If you are running ColdFusion in a multihomed environment and have problems displaying the ColdFusion
Administrator, see “Web Server Management” on page 79 for configuration information.
For more information, see “Using the ColdFusion Administrator” on page 7.
About web server administration
Co ldFusi on appli cat ions r equire a web s erve r to pro cess C oldFus ion Markup L ang uag e (CFML ) pa ges. Th e se rver
and multiserver configurations provide a built-in web server along with support for external web servers, such as
Apache, IIS, and Sun ONE Web Server (formerly known as iPlanet).
For more information, see “Web Server Management” on page 79.
About Verity administration
ColdFusion includes Verity K2 Server search technology. Verity K2 Server is a high-performance search engine
designed to process searches quickly in a high-performance, distributed system.
For more information, see “Introducing Verity and Verity Tools” on page 143.
Chapter 3: Using the ColdFusion
Administrator
Use the ColdFusion Administrator to perform basic administration tasks. You can also use the Administrator
application programming interface (API) to perform Administrator functionality programmatically.
Immediately after you install ColdFusion, you might have to perform some or all of the administrative tasks
described in the following table:
CHAPTER 3
8
Using the ColdFusion Administrator
TaskDescription
Establish database connections
Specify directory mappings Directory mappings redirect relative file paths to physical directories on your server.
Configure debugging
settings
Set up e -mailE-mail lets ColdFusion applications send automated e-mail messages. To configure an
Change passwordsYou might have to change the passwords that you set for the ColdFusion Adminis-
Define user-specific access
to the ColdFusion Administrator
ColdFusion applications require data source connections to query and write to databases. To create, verify, edit, and delete database connections, use the Data Sources
page.
For more information, see “Data Source Management” on page 47.
To specify server-wide directory aliases, use the Mappings page.
For more information, see “Mappings page” on page 17.
Debugging information provides important data about CFML page processing. To
choose the debugging information to display, and to designate an IP address to
receive debugging information, use the Debugging & Logging section.
For more information, see “Debugging Output Settings page” on page 26.
e-mail server and mail options, use the Mail Server page.
For more information, see “Mail page” on page 17.
trator and Remote Development Service (RDS) during ColdFusion installation. To
change passwords, use the Security section.
For more information, see “Administrator page” on page 38 and “RDS page” on
page 38.
To grant user-specific access to the ColdFusion Administrator, you create users and
specify a username, password, applicable sandboxes, and the sections of the ColdFusion Administrator that each user can access. For more information, see “Security
section” on page 37.
Configure Java settings(Server configuration only) You might have to customize Java settings, such as class-
Restrict tag accessSome CFML tags might present a potential security risk for your server. To disable
path information, to meet the needs of your applications. To change Java settings, use
the Java and JVM page.
For more information, see “Extensions section” on page 33.
certain tags, use the Sandbox Security page.
For more information, see “Administering Security” on page 101.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Accessing user assistance
You can use the buttons on the top left of the ColdFusion Administrator to access online Help, information about
additional resources, and system information.
Online Help You can access the context-sensitive online Help by clicking the question-mark icon on any
ColdFusion Administrator page. The online Help has procedural and brief overview content for the ColdFusion
Administrator page that you are viewing. This information appears in a new browser window and contains
standard Contents, Index, and Search tabs.
System Information Click System Information to see information about the ColdFusion server, including version
number, serial number, and JVM details.
Resources Click Resources to display the Resources page, which provides links to the Getting Started experience,
example applications, product information, technical support and training, additional installers, product updates,
community resources, and information about security.
Server Settings section
9
The Server Settings section lets you manage client and memory variables, mappings, charting, and archiving. You
also configure e-mail and Java settings in this section.
The Server Settings section contains the following pages:
• Settings page
• Caching page
• Client Variables page
• Memory Variables page
• Mappings page
• Mail page
• Charting page
• Font Management page
• Java and JVM page
• ColdFusion Archives page
CHAPTER 3
10
Using the ColdFusion Administrator
• Settings Summary page
Settings page
The Settings page of the ColdFusion Administrator contains configuration options that you can set or enable to
manage ColdFusion. These options can significantly affect server performance. The following table describes the
options:
OptionDescription
Timeout Requests After
(Seconds)
Enable Per App SettingsLets developers programmatically define ColdFusion settings such as mappings
Use UUID For cftokenSpecify whether to use a universally unique identifier (UUID), rather than a
Enable HTTP Status CodesConfigures ColdFusion to set a status code of 500 Internal Server Error for an
Enable Whitespace Management
Disable CFC Type CheckTurns off verifying the CFC type when calling methods with CFCs as arguments.
Disable Access To Internal ColdFusion Java Components
Watch Configuration Files For
Changes (Check Every n
Seconds)
Prevents unusually lengthy requests from using up server resources. Enter a limit
to the time that ColdFusion waits before terminating a request. Requests that take
longer than the time-out period are terminated.
and debugging per application.
random number, for a cftoken.
unhandled error. Disable this option to configure ColdFusion to set a status code
of 200 OK for everything, including unhandled errors.
Compresses repeating sequences of spaces, tabs, and carriage returns and linefeeds. Compressing whitespace can significantly compact the output of a ColdFusion page.
This option also disables verifying an object that implements the right inter face.
Although enabling this option can improve your application's performance,
enable it only on a production server when you are not making changes to your
application.
Prevents CFML code from accessing and creating Java objects that are part of the
internal ColdFusion implementation. This prevents a non-authenticated CFML
template from reading or modifying administration and configuration information for this server.
Sets ColdFusion to monitor its configuration files and automatically reload them
if they change. This action is required if you deploy ColdFusion in a Websphere ND
vertical cluster, because multiple instances of ColdFusion share the same configuration files. Most installations should not enable this feature.
Enable Global Script Protection Protects Form, URL, CGI, and Cookie scope variables from cross-site scripting
attacks. Select this option if your application does not contain this type of protection logic.
OptionDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
11
Default CFFORM ScriptSrc
Directory
Missing Template HandlerSpecify a page to execute when ColdFusion cannot find a requested page. This
Site-Wide Error HandlerSpecify a page to execute when ColdFusion encounters an error while processing
Maximum Size Of Post DataLimits the amount of data that can be posted to the server in a single request.
RequeSt Throttle ThresholdRequests smaller than the specified limit are neither queued nor counted as part
Request Throttle MemoryLimits total memory size for the throttle. If sufficient tot al memory is not available,
Specify the default path (relative to the web root) to the directory that contains
the cfform.js file. Developers reference this file in the ScriptSrc attribute of the
cfform tag.
In a hosted environment, you might need to move the cfform.js file to a directory
other than CFIDE.
specification is relative to the web root.
Note: If the user is running Microsoft Internet Explorer with "Show Friendly HT TP
error messages" enabled in advanced settings (the default), Internet Explorer will
only display this page if it contains more than 512 bytes.
a request. This specification is relative to the web root. When you define a sitewide error handler or missing template handler, ColdFusion does not log pagenot-found errors and exceptions.
Note: If the user is running Internet Explorer with Show Friendly HTTP Error
Messages enabled in Advanced Settings (the default), Internet Explorer only
displays this page if it contains more than 512 bytes.
ColdFusion rejects single requests larger than the specified limit.
of the total memory. Requests larger than the specified limit are counted as part
of total memory and are queued if the request throttle-memory size is exceeded.
ColdFusion queues requests until enough memory is free.
Request Tuning page
The Request Tuning page of the Administrator contains configuration options that you use to specify the number
of different types of requests and threads that ColdFusion can handle simultaneously.
CHAPTER 3
12
Using the ColdFusion Administrator
OptionDescription
Maximum Number Of Simultaneous Template Requests
Maximum Number Of Simultaneous Flash Remoting Requests
Maximum Number Of Simultaneous Web Service Requests
Maximum Number Of Simultaneous CFC Function Requests
Maximum Number Of Simultaneous Report Threads
Maximum Number Of Threads
Available For CFTHREAD
Timeout Requests Waiting In
Queue After n Seconds
Request Queue Timeout Page Specify a relative path to an HTML page to send to clients when a template
Maximum Number Of Running
JRun Threads
The number of CFML page requests that can be processed concurrently. Use this
setting to increase overall system performance for heavy-load applications.
Requests beyond the specified limit are queued.
The number of Adobe Flash® Remoting requests that can be processed concurrently.
The number of Web Service requests that can be processed concurrently.
The number of ColdFusion Component methods that can be processed concurrently through HTTP. This does not affect starting CFC methods from CFML, only
methods requested through an HTTP request.
The maximum number of ColdFusion reports that can be processed concurrently.
CFTHREAD that runs concurrently. Threads that CFTHREAD creates in excess of
this are queued.
If a request has waited in the queue for this long, time out the request. This value
should be at least as long as the Request Timeout setting (currently 60 seconds).
request times out before getting a chance to run. For example
"/CFIDE/timeout.html.” This page cannot contain CFML. If a page is not specified
here, clients will receive a 500 Request Timeout error if their request does not get
a chance to run.
Maximum number of JRun handler threads that will run concurrently. This is the
number of request threads that the underlying JRun J2EE application server will
run at the same time. This includes any non-ColdFusion requests such as JSP or
HTML pages served through JRun.
Maximum Number Of Queued
JRun Threads
Maximum number of requests that JRun will accept at any one time. This is the
number of requests that the underlying JRun J2EE application server will accept
at the same time.
Caching page
The Caching page of the Administrator contains configuration options that you can set or enable to cache
templates, queries, and data sources. These options can significantly affect server performance. The following
table describes the settings:
OptionDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
13
Maximum Number Of Cached
Tem pl at es
Trusted CacheUse cached templates without checking whether they changed. For sites that are
Save Class FilesSaves to disk the class files that the ColdFusion bytecode compiler generates.
Cache Web Server PathsCaches ColdFusion page paths for a single server. Clear this option if ColdFusion
Maximum Number Of Cached
Queries
Clear Template Cache NowEmpties the template cache. ColdFusion reloads templates into memory the nex t
Enter a value that specifies the number of templates that ColdFusion caches. For
best performance, set this to a value that is large enough to contain your application’s commonly accessed ColdFusion pages, yet small enough to avoid excessive
reloading. You can experiment with a range of values on your development
server; a suitable starting point is one page per MB of Java Virtual Machine (JVM)
size.
not updated frequently, using this option minimizes file system overhead.
During the development phase, it is typically faster if you disable this option.
connects to a web server with multiple websites or multiple virtual websites.
Enter a value to limit the maximum number of cached queries that the server
maintains. Cached queries allow retrieval of result sets from memory rather than
through a database transaction. Because queries reside in memory, and query
result set sizes differ, you must provide a limit for the number of cached queries.
You enable cached queries with the cachedwithin or cachedafter attributes
of the cfquery tag. When the maximum number of cached queries is reached,
the oldest query is dropped from the cache and replaced with the specified quer y.
If you set the maximum number of cached queries to 0, query caching is unlimited.
time they are requested and recompiles them if they have been modified.
Client Variables page
Client variables let you store user information and preferences between sessions. Using information from client
variables, you can customize page content for individual users.
You enable client variable default settings in ColdFusion on the Client Variables page of the Administrator.
ColdFusion lets you store client variables in the following ways:
❖ In database tables
Note: If your data source uses one of the JDBC drivers bundled with ColdFusion 8, ColdFusion can automatically
create the necessary tables. If your data source uses the ODBC Socket or a third-party JDBC driver, you must
manually create the necessary CDATA and CGLOBAL database tables.
• As cookies in users’ web browsers
CHAPTER 3
14
Using the ColdFusion Administrator
• In the operating system registry
Important: Adobe recommends that you do not store client variables in the registry because it can critically degrade
performance of the server. If you do use the registry to store client variables, you must allocate sufficient memory and
disk space.
To override settings specified in the Client Variables page, use the Application.cfc file or the
cfapplication tag.
For more information, see the ColdFusion Developer’s Guide.
The following table compares the client variable storage options:
Storage typeAdvantagesDisadvantages
Data source• Can use existing data source
• Portable: not tied to the ho st system or
operating system
Browser cookies• Simple implementation
• Good performance
• Can be set to expire automatically
• Client-side control
System registry• Simple implementation
• Good performance
• Registry can be exported easily to
other systems
• Server-side control
• Requires database transaction to read/write
variables
• More complex to implement
• Users can configure browsers to disallow
cookies
• Cookie data is limited to 4 KB
• Netscape Navigator allows only 20 cookies
from one host; ColdFusion uses three cookies
to store read-only data, leaving only 17
cookies available
• Possible restriction of the registry’s maximum
size limit in Windows in the Control Panel
• Integrated with the host system: not practical
for clustered servers
• Not available for UNIX
Migrating client variable data
To migrate your client variable data to another data source, you should know the structure of the database tables
that store this information. Client variables stored externally use two simple database tables, like those shown in
the following tables:
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
CDATA Table
ColumnData type
cfidCHAR(64), TEXT, VARCHAR, or equivalent
appCHAR(64), TEXT, VARCHAR, or equivalent
dataMEMO, LONGTEXT, LONG VARCHAR, or equivalent
CGLOBAL Table
ColumnData type
cfidCHAR(64), TEXT, VARCHAR, or equivalent
dataMEMO, LONGTEXT, LONG VARCHAR, or equivalent
lvisitTIMESTAMP, DATETIME, DATE, or equivalent
Creating client variable tables
Use the following sample ColdFusion page as a model for creating client variable database tables in your own
database. However, keep in mind that not all databases support the same column data type names. For the proper
data type, see your database documentation.
15
Note: The ColdFusion Administrator can create client variable tables for data sources that use one of the bundled
JDBC drivers. For more information, see the online help.
Sample table creation page
<!---- Create the Client variable storage tables in a datasource.
This example applies to Microsoft Access databases. --->
Use the Memory Variables page of the ColdFusion Administrator to enable application and session variables
server-wide. By default, application and session variables are enabled when you install ColdFusion. If you disable
either type of variable in the Memory Variables page, you cannot use them in a ColdFusion application.
You can specify maximum and default time-out values for session and application variables. Unless you define a
time-out value in an Application.cfc or Application.cfm file, application variables expire in two days. Session
variables expire when user sessions end. To change these behaviors, enter new default and maximum time-out
values on the Memory Variables page of the Administrator.
Note: Time-out values that you specify for application variables override the time-out values set in the Application.cfc
or Application.cfm file.
You can also specify whether to use J2EE session variables. When you enable the J2EE session variables,
ColdFusion creates an identifier for each session and does not use the CFToken or CFID cookie value. For more
information, see the ColdFusion Developer’s Guide.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Note: When using J2EE sessions, ensure that the session time out, specified in the WEB-INF/web.xml session-
timeout
than any
element, is longer than the session time out that you specify in the ColdFusion Administrator, and longer
sessiontimeout attribute specified in a cfapplication tag.
Mappings page
Use the Mappings page of the ColdFusion Administrator to add, update, and delete logical aliases for paths to
directories on your server. ColdFusion mappings apply only to pages that ColdFusion processes with the
cfinclude and cfmodule tags. If you save CFML pages outside of the web_root directory (or whatever directory
is mapped to "/"), you must add a mapping to the location of those files on your server.
Assume that the "/" mapping on your server points to C:\coldfusion8\wwwroot, but that all of your ColdFusion
header pages reside in C:\2002\newpages\headers. For ColdFusion to find your header pages, you must add a
mapping in the ColdFusion Administrator that points to C:\2002\newpages\headers (for example, add a mapping
for /headers that points to C:\2002\newpages\headers). In the ColdFusion pages located in
C:\coldfusion8\wwwroot, you reference these header pages using /headers in your
tags.
Note: ColdFusion mappings are different from web server virtual directories. For information on creating a virtual
directory to access a given directory using a URL in your web browser, consult your web server’s documentation.
cfinclude and cfmodule
17
Mail page
Use the Mail page of the ColdFusion Administrator to specify a mail server to send automated e-mail messages.
ColdFusion supports the Simple Mail Transfer Protocol (SMTP) for sending e-mail messages and the Post Office
Pr oto col ( POP) for ret ri evin g e-m ail m ess ages from you r mai l s erve r. To u se e- mail mess agin g in yo ur C oldFusio n
applications, you must have access to an SMTP server and a POP account.
The ColdFusion Enterprise Edition supports mail-server failover, as well as additional mail delivery options.
The ColdFusion implementation of SMTP mail uses a spooled architecture. This means that when a
is processed in an application page, the messages generated might not be sent immediately. If ColdFusion is
extremely busy or has a large queue, delivery could occur after some delay.
Note: For more information about the
cfmail tag, see “Sending SMTP e-mail with the cfmail tag” on page 1420 in
“Sending and Receiving E-Mail” on page 1417 in the ColdFusion Developer’s Guide.
Mail Server Settings area
The following table describes basic mail server settings:
cfmail tag
CHAPTER 3
18
Using the ColdFusion Administrator
OptionDescription
Mail ServerEnter a valid mail server for sending dynamic SMTP mail messages in the text box.
UsernameEnter the username for the mail server, if required.
PasswordEnter the password for the mail server, if required.
Verify Mail Server Connection
Server PortEnter the number of the port on which the mail ser ver is running. Contact your server
Backup Mail Servers (Enterprise Edition only)
Maintain Connection To Mail
Server
(Enterprise Edition only)
Connection Timeout
(seconds)
You can enter an Internet address, such as mail.company.com, or the IP address of the
mail server, such as 127.0.0.1.
Verifies that ColdFusion can connect to your specified mail server after you submit
this form.
Whether or not you use this option, send a test message to verify that your mail
server connection works.
administrator if you are unsure of the appropriate port number.
Enter zero or more backup servers for sending SMTP mail messages. You can enter an
Internet address, such as mail.company.com, or the IP address of the mail server, such
as 127.0.0.1. Separate multiple servers with a comma.
If the mail server requires authentication, prepend the mail ser ver with the username
and password, as follows: username:password@mailserveraddress
To use a port number other than the default (25), specify mailserveraddress:port-
number
Keeps mail server connections open after sending a mail message. Enabling this
option can enhance performance when delivering multiple messages.
Enter the number of seconds that ColdFusion should wait for a response from the
mail server before timing out.
Enable SSL Socket Connections To Mail Server
Enable TLS Connection To
Mail Server
Enables SSL encryption on the connections to the mail server.
Enables Transport Level Security (TLS) on the connection to the mail server.
Mail Spool Settings area
The following table describes mail server spool settings:
OptionDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
19
Spool Interval (Seconds)Enter the interval, in seconds, at which you want the mail server to process spooled
Mail Delivery Threads
(Enterprise Edition only)
Spool Mail Messages For
Delivery To
(Memory spooling available
for Enterprise Edition only)
Maximum Number Of
Messages Spooled To
Memory
(Enterprise Edition only)
mail.
Enter the maximum number of simultaneous threads used to deliver spooled mail.
Routes outgoing mail messages to the mail spooler. If you disable this option, ColdFusion delivers outgoing mail messages immediately. In ColdFusion Enterprise
Edition, you can spool messages to disk (slower, but messages persist across shutdowns) or to memory (faster, but messages do not persist).
You can override this setting in the cfmail tag.
Enter the maximum number of messages that spool to memory before switching to
disk spooling.
Mail Logging Settings area
Select preferences for handling mail logs, as described in the following table:
OptionDescription
Error Log SeverityFrom the drop-down list box, select the type of SMTP-related error message to write
to a log file. The options are the following:
• Debug (contains Information, Warning, and Error)
• Information (contains Warning and Error)
• Warning (contains Error)
• Error
Log All Mail Messages Sent
By ColdFusion
Saves to a log file the To, From, and Subject fields of all e-mail messages.
ColdFusion writes sent-mail and mail-error logs to the following directories:
• \coldfusion8\logs (Windows server configuration)
• /opt/coldfusion8/log (Solaris and Linux server configuration)
• cf_webapp_root/WEB-INF/cfusion/logs (multiserver and J2EE configurations, all platforms)
The following table describes the e-mail log files:
CHAPTER 3
20
Using the ColdFusion Administrator
LogDescription
mailsent.logRecords sent e-mail messages.
mail.logRecords general e-mail errors.
Mail Character Set Settings area
Select preferences for the default mail character set, as described in the following table:
OptionDescription
Default CFMail CharSetFrom the drop-down list box, select the default character set that the cfmail tag
uses. The default value is UTF-8. If the majority of your e-mail clients use a specific
character set, you can use this setting to switch to that locale-specific character set.
For example, Japanese mail is typically sent using the ISO-2022-JP character set.
Charting page
Th e Co ldFus ion charti ng and graphi ng s erve r le ts you produ ce h igh ly c ust omizable bus ine ss g raphi cs, in a var iety
of formats, using the
cfquery tag. Use the Charting page in the Administrator to control characteristics of the
server.
The following table describes the caching and thread settings for the ColdFusion charting and graphing server:
OptionDescription
Cache TypeSet the cache type. Charts can be cached either in memory or to disk. Memory
Maximum Number Of
Cached Images
Max Number Of Charting
Threads
Disk Cache LocationWhen caching to disk, specify the directory in which to store the generated charts.
caching is faster, but more memory intensive.
Specify the maximum number of charts to store in the cache. After the cache is ful l, if
you generate a new chart, ColdFusion discards the oldest chart in the cache.
Specify the maximum number of chart requests that can be processed concurrently.
The minimum number is 1 and the maximum is 5. (Higher numbers are more
memory-intensive.)
Font Management page
The Font Management page lets you review and define fonts for use with Adobe® FlashPaper™ and Acrobat® PDF
output formats. ColdFusion generates FlashPaper and PDF output through the
cfreport tag, when used to call a report created with the ColdFusion Report Builder.
cfdocument tag and through the
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
ColdFusion automatically registers Acrobat built-in fonts and fonts located in typical font locations (such as the
Windows\fonts directory). However, if your server has additional fonts installed in nonstandard locations, you
must register them with the ColdFusion Administrator so that the
cfdocument and cfreport tags can lo cate and
render PDF and FlashPaper reports.
This page contains the following sections:
Register New Font with ColdFusion Lets you browse to a directory that contains fonts, or select a specific font.
User Defined Fonts Displays the fonts that have been registered explicitly.
Current System Fonts Displays fonts stored in platform-specific system font directories.
For more information on font management, see the ColdFusion Administrator online Help. For more information
on reporting in ColdFusion, see “Creating Reports and Documents for Printing” on page 1075 in the ColdFusion Developer’s Guide.
Java and JVM page
The Java and JVM page lets you specify the following settings, which enable ColdFusion to work with Java:
OptionDescription
21
Java Virtual Machine PathThe absolute file path to the location of the Java Virtual Machine (JVM) root directory.
Minimum JVM Heap SizeThe JVM initial heap size.
Maximum JVM Heap Size The JVM maximum heap size. The default value is 512 MB.
ColdFusion Class PathThe file paths to the directories that contain the JAR files that ColdFusion uses.
JVM ArgumentsThe arguments to the JVM. Use a space to separate multiple entries (for example, -
The default is cf_root/runtime/jre.
Specify either the fully qualified name of a directory that contains your JAR files or a
fully qualified JAR filename. Use a comma to separate multiple entries.
Xint -Xincgc).
Note: This page is available in the server configuration only.
Before ColdFusion saves your changes, it saves a copy of the current cf_root/runtime/bin/jvm.config file as
jvm.bak. If your changes prevent ColdFusion from restarting, use the jvm.bak file to restore your system. For more
information, see the online help.
CHAPTER 3
22
Using the ColdFusion Administrator
Settings Summary page
The Settings Summary page shows all ColdFusion configuration settings. Click a group name to open that group’s
Administrator section, where you can edit settings. This page is not enabled in the Standard Edition.
Data & Services section
The Data & Services section of the Administrator is the interface for ColdFusion, data sources, and Verity search
and indexing features. The following table describes some common tasks that you can perform in the Data &
Services section of the Administrator:
TaskDescription
Create and manage JDBC
data sources
Create and maintain Verity
collections
Define mappings for web
services
Specify settings to integrate
with Adobe® Flex™ applications
The Data Sources page lets you establish, edit, and delete JDBC data source connections for ColdFusion. For more information, see “Data Source Management” on
page 47.
The Verity Collections page lets you create and dele te Verity collections and perform
maintenance operations on collections that you create. For more information, see
“Verity Collections page” on page 23.
The Web Services page lets you produce and consume remote application functionality over the Internet. For more information, see “Web Services page” on page 24.
The Flex Integration page lets you specify which Flex integration features to enable
and which IP addresses can perform data service operations. For more information,
see “Flex Integration page” on page 24.
The Data & Services section contains the following pages:
• Data Sources page
• Verity Collections page
• Verity K2 Server page
• Web S e rv ic e s pa g e
• Flex Integration page
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Data Sources page
The Data Sources page lets you create, edit, and delete JDBC data sources. Before you can use a database in a
ColdFusion application, you must register the data source in the ColdFusion Administrator. For more information, see “Data Source Management” on page 47.
Verity Collections page
ColdFusion includes Verity, which provides indexing and searching technology to create, populate, and manage
collections of indexed data that are optimized for fast and efficient site searches.
A collection is a logical group of documents and metadata about the documents. The metadata includes word
indexes, an internal documents table of document field information, and logical pointers to the document files.
For more information about building search interfaces, see “Building a Search Interface” on page 665 in the
ColdFusion Developer’s Guide.
ColdFusion lets you manage your collections from the Administrator. You can index, optimize, purge, or delete
Verity collections that are connected to ColdFusion. You use the icons in the Actions column to perform the
following actions:
ActionDescription
23
IndexAnalyzes the files in a collection and assembles metadata and pointers to the files.
OptimizeReclaims space left by deleted and changed files by consolidating collection indexes for
PurgeDeletes all documents in a collection, but not the collection itself. Leaves the collection
DeleteDeletes a collection.
faster searching. You should optimize collections regularly.
directory structure intact.
Ver ity Se arch Se rv er mu st b e runn ing. If t his p age i s una ble to re trie ve col lect ions , ens ure that Veri ty Se arch Ser ver
is running. For more information, see “Collections and the ColdFusion Verity architecture” on page 143.
Verity K2 Server page
You can install Verity on a different host computer from the computer that ColdFusion is running on. If you do
so, you can configure the host that ColdFusion will use when it performs search operations. If you have purchased
the Verity product, you may need to use advanced settings to configure the aliases and ports of the services that
ColdFusion uses. You should not need to change these values if you are running with the ColdFusion installed
version of Verity.
CHAPTER 3
24
Using the ColdFusion Administrator
Web Services page
You can use web services to produce and consume remote application functionality over the Internet. The
ColdFusion Administrator lets you register web services so that you do not have to specify the entire Web Services
Description Language (WSDL) URL when you reference the web service. The first time you reference a web
service, ColdFusion automatically registers it in the Administrator.
When you register a web service, you can shorten your code and change a web service’s URL without editing your
code. For more information, see “Using Web Services” on page 1291 in the ColdFusion Developer’s Guide.
Flex Integration page
Use this page to specify which Flex integration features to enable and which IP addresses can perform data-service
operations. If you enable Adobe LiveCycle Data Services ES support, but do not specify any IP addresses, only
processes on the local computer can connect to the LiveCycle Data Services ES server in ColdFusion.
OptionDescription
Enable Flash
Remoting Support
Enable Remote LiveCycle Data Management Access
Server IdentitySpecifies the ColdFusion server on which you want to enable Flex Data Management
Enable RMI Over SSL
For Data Management
Select IP Addresses
Where LiveCycle
Data Services Are
Running
Specifies whether to enable Flash clients to connect to this ColdFusion server and invoke
methods in ColdFusion components (CFCs).
Specifies whether to enable a LiveCycle Data Ser vices ES server to connect to this ColdFusion
server and invoke methods in CFCs to fill, sync, get, or count records in a result set used in a
Flex application. Enable this option only if you are running LiveCycle Data Services ES
remotely.
Support.
To encrypt communication between ColdFusion and Flex, enable Secure Sockets Layer (SSL).
Specifies which LiveCycle Data Services ES servers can connect to the LiveCycle Data
Services ES support in ColdFusion. If you do not specify a list of allowed IP addresses, only
processes on the local computer can connect to the LiveCycle Data Services ES support in
ColdFusion
To use SSL, create a keystore file. The keystore is a self-signed certificate. (You do not need a certificate signed by
a Certificate Authority, although if you do use one, you do not need to configure Flex as indicated in the following
steps.) The information in the keystore is encrypted and can be accessed only with the password that you specify.
To create the keystore, use the Java keytool utility, which is included in the Java Runtime Environment (JRE).
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Enable SSL
Create the keystore.
1
2 Configure Flex.
3 Enable SSL in the ColdFusion Administrator.
Create the keystore
To generate the SSL server (ColdFusion) keystore file, use the keytool utility, with a command similar to the
The following table describes the parameters of the keytool utility:
ParameterDescription
25
-aliasThe name of the keystore entry. You can use any name for this, as long as you are consistent
-dnameThe Distinguished Name, which contains the Common Name (cn) of the server.
-keystoreThe location of the keystore file.
-keypassThe password for your private key.
-storepassThe password for the keystore. The encrypted storepass is stored in ColdFusion configura-
-rfcGenerates the certificate in the printable encoding format.
-fileThe name of the keystore file.
-vGenerates detailed certificate information
when referring to it.
tion files.
Place the certificate you created in the file that the JVM uses to determine what certificates to trust. The file in
which you put the certificate, (usually named cacerts), is located in the JRE, in the lib/security folder.
Configure Flex
1
To export the keystore to a certificate, use the keytool utility, with a command similar to the following:
The preceding example specifies the location of the keystore for LiveCycle Data Services ES with integrated JRun,
installed by using the default settings. If you are using a different server, specify the location of the cacerts file for
the JRE that you are using. For example, if you are using JBoss, specify the keystore location as
$JAVA_HOME/jre/lib/security/cacerts.
Enable SSL in the ColdFusion Administrator
Select Data & Services > Flex Integration, and specify the keystore file in the Full Path To Keystore box.
1
2 Specify the keystore password in the Keystore Password box.
3 Select Enable RMI Over SSL For Data Management, and then click Submit Changes.
If you specify an invalid keystore file or password, ColdFusion does not enable SSL, and disables LiveCycle Data
Management Support.
Debugging & Logging section
The Debugging & Logging section contains the following pages:
• Debugging Output Settings page
• Debugging IP Addresses page
• Debugger Settings page
• Logging Settings page
• Log Files page
• Scheduled Tasks page
• System Probes page
• Code Analyzer page
• License Scanner page
Debugging Output Settings page
Use the Debugging Settings and Debugging IPs pages to configure ColdFusion to provide debugging information
for every application page that a browser request. Specify debugging preferences by using the pages as follows:
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
• On the Debugging Settings page, select debugging output options. If debugging is enabled, the output appears
in block format after normal page output.
• On the Debugging IPs page, restrict access to debugging output. If a debugging option is enabled, debugging
output is visible to all users by default.
Note: Enabling debugging affects performance. You should not enable debugging on a production server.
The Debug Output Settings page provides the following debugging options:
OptionDescription
27
Enable Robust Exception Information Displays detailed information in the exceptions page, including the
Enable Request Debugging OutputEnables the ColdFusion debugging service.
Select Debugging Output FormatControls debugging format. Select either of the following formats:
template’s physical path and URI, the line number and snippet, the SQL
statement used (if any), the data source name (if any), and the Java stack
trace.
• classic.cfm The format available in ColdFusion 5 and earlier. It provides
a basic view and few browser restrictions.
• dockable.cfm A dockable tree-based debugging panel. For details
about the panel and browser restrictions, see the online Help.
Report Execution TimesReports execution times that exceed a specified time limit.
General Debug InformationShow general information about the ColdFusion MX version, template,
Database Activity Shows the database activity for the SQL Query events and Stored Proce-
Exception InformationShows all ColdFusion exceptions raised for the request in the debugging
Tracing InformationShows trace event information in the debugging output. Tracing lets you
Timer InformationShows output from the cftimer tag.
Flash Form Compile Errors And
Messages
time stamp, user locale, user agent, user IP, and host name.
dure events in the debugging output.
output.
track program flow and efficiency using the cftrace tag.
(Development use only) Displays ActionScript errors in the browser when
Flash forms are compiling, and affects the display time of the page.
CHAPTER 3
28
Using the ColdFusion Administrator
OptionDescription
VariablesDisplays information about parameters, URL parameters, cookies, sessions,
Enable Performance Monitoring
(Server configuration only)
Enable CFSTAT
(Server configuration only)
and CGI variables in the debugging output.
Enables the standard NT Performance Monitor application to display information about a running server.
TIP: Restart ColdFusion after you change this setting.
Shows performance information on platforms that do not support the NT
Performance Monitor. For more information, see “Using the cfstat utility” on
page 28.
TIP: Restart ColdFusion after you change this setting.
Using the cfstat utility
The cfstat command-line utility provides real-time performance metrics for ColdFusion. Using a socket
connection to obtain metric data, the
cfstat utility displays the information that ColdFusion writes to the System
Monitor without actually using the System Monitor application. The following table lists the metrics that the
cfstat utility returns:
Metric abbreviation Metric nameDescription
Pg/SecPage hits per secondThe number of ColdFusion pages processed per second.
DB/SecDatabase accesses per secondThe number of database accesses per second that Cold-
You can reduce this by moving static content to HTML
pages.
Fusi on makes. Any difference in complexity and resource
load between calls is ignored.
Req Q'edNumber of queued requestsThe number of requests that are currently waiting for
Req Run'gNumber of running requestsThe number of requests that ColdFusion is currently
Req TO'edNumber of timed out requestsThe total number of ColdFusion requests that have timed
ColdFusion to process them. Lower values, which you
can achieve with efficient CFML, are better.
actively processing.
out. Lower values, which you can achieve by aggressive
caching, removing unnecessary dynamic operations and
third-party events, are better.
Metric abbreviation Metric nameDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
29
AvgQ TimeAverage queue timeA running average of the time, in milliseconds, that
AvgReq TimeAverage request timeA running average of the time, in milliseconds, that it
AvgDB TimeAverage database transaction
time
Bytes In/SecBytes incoming per secondThe number of bytes that ColdFusion read in the last
Bytes Out/SecBytes outgoing per secondThe number of bytes that ColdFusion wrote in the last
requests wait for ColdFusion to process them. Lower
values, which you can achieve with efficient CFML and
enhanced caching, are better.
takes ColdFusion to process a request (including queued
time). Lower values, which you can achieve with efficient
CFML, are better.
A running average of the time that ColdFusion spends on
database-related processing of ColdFusion requests.
second (not an average).
second (not an average).
Before you use the cfstat utility, ensure that you selected the Enable Performance Monitoring option in the
ColdFusion Administrator (on the Debugging & Logging > Debugging Settings page). If you select this option,
you must restart ColdFusion for this change to take effect.
cfstat options
The cf_root/bin directory contains the cfstat utility. From that directory, type cfstat and use the following
switches:
SwitchDescriptionComment
-nSuppress column headers.Useful for saving output to a file.
-sDisplay output in a single line.Display a single line and delay display of the first line so
#Where # is an integer, display
This example runs the
output every # seconds.
cfstat utility and displays a new line every 20 seconds:
the cfstat utility can display meaningful values in the
per-second counters.
If you do not specify an integer, the
returns one line. Specify this switch with or without the -s
switch.
cfstat utility
cfstat 20
CHAPTER 3
30
Using the ColdFusion Administrator
Debugging IP Addresses page
You use the Debugging IP Addresses page to restrict debugging output to one or more IP addresses. You can add
and remove IP addresses.
Note: If you do not specify IP addresses, and debugging options are active, ColdFusion displays debugging output for
all users.
Debugger Settings page
To use the ColdFusion Debugger that runs in Eclipse, select the Allow Line Debugging option.
Specify the port and the maximum number of simultaneous debugging sessions. Specify the debugger port in the
JVM settings of your application server, for example:
To stop a currently running debugging session, click Stop Debugging.
To make the changes you specify on this page take effect, restart the ColdFusion server.
Logging Settings page
Use the Logging Settings page of the Administrator to change ColdFusion logging options. The following table
describes the settings:
OptionDescription
Log DirectorySpecifies the directory to which error log files are written.
TIP: Restart ColdFusion after you change this setting.
Maximum File Size (kb) Sets the maximum file size for log files. When a file hits this size, it automatically
Maximum Number Of ArchivesSets the maximum number of log archives to create. When they reach this limit,
Log Slow Pages Taking Longer
Than [n] Seconds
Log All CORBA CallsLogs all CORBA calls.
Enable Logging For Scheduled
Tas ks
is archived.
files are deleted in the order of oldest to newest.
Logs the names of pages that take longer than the specified interval to process.
Logging slow pages can help you diagnose potential problems or bottlenecks in
your ColdFusion applications. Entries are written to the server.log file.
Logs ColdFusion Executive task scheduling.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Log Files page
The Log Files page lets you perform operations on log files, such as searching, viewing, downloading, archiving,
and deleting.
Click on a Log File icon, located in the Actions column of the Available Log Files table, to search, view, download,
archive, or delete a log file.
For more information, see the ColdFusion Administrator online Help.
The following table describes the ColdFusion log files:
Log fileDescription
31
rdservice.logRecords errors that occur in the ColdFusion Remote Development Service (RDS).
application.logRecords every ColdFusion error reported to a user. Application page errors,
exception.log Records stack traces for exceptions that occur in ColdFusion.
scheduler.logRecords scheduled events that have been submitted for execution. Indicates
eventgateway.logRecords events and errors related to event gateways.
migration.logRecords errors related to upgrading from a previous version of ColdFusion.
migrationException.logRecords errors related to running ColdFusion applications after upgrading from
server.logRecords errors for ColdFusion.
customtag.logRecords errors generated in custom tag processing.
car.logRecords errors associated with site archive and restore operations.
mail.logRecords errors generated by an SMTP mail server.
mailsent.logRecords messages that ColdFusion
flash.logRecords entries for Flash® Remoting.
RDS provides remote HTTP-based access to files and databases.
including ColdFusion syntax, ODBC, and SQL errors, are written to this log file.
whether task submission was initiated and whether it succeeded. Provides the
scheduled page URL, the date and time executed, and a task ID.
a previous version of ColdFusion.
sends.
CHAPTER 3
32
Using the ColdFusion Administrator
Scheduled Tasks page
You use the Scheduled Tasks page to schedule the execution of local and remote web pages, to generate static
HTML pages, send mail with the
cfmail tag, update database tables, index Verity collections, delete temporary
files, and any other batch-style processing. The scheduling facility is useful for applications that do not require
user interactions or customized output. ColdFusion developers use this facility to schedule daily sales reports,
corporate directories, statistical reports, and so on.
Information that is read more often than written is a good candidate for scheduled tasks. Instead of executing a
quer y to a database every time t he page is requeste d, ColdFusion renders t he static page with information that the
scheduled event generates. Response time is faster because no database transaction takes place.
You can run scheduled tasks once; on a specified date; or at a specified time, daily, weekly, or monthly; daily; at a
specified interval; or between specified dates.
The Scheduled Task page lets you create, edit, pause, resume, and delete scheduled tasks. For more information,
see the online help.
System Probes page
System probes help you evaluate the status of your ColdFusion applications. Like scheduled tasks, they access a
URL at a specified interval, but they can also check for the presence or absence of a string in the URL. If the URL
contents are unexpected, or if an error occurred while accessing the URL, the probe can send an e-mail alert to
the address specified on the System Probes page. The probe can also execute a script to perform a recovery action,
such as restarting the server. All probe actions are logged in the logs/probes.log file. The System Probes page also
displays the status of each probe.
You use the buttons in the Actions column in the System Probes table to perform the following actions:
ActionDescription
EditLets you edit the probe.
RunRuns the probe immediately, even if it was previously disabled.
Enable/DisableStarts and stops the probe from automatically executing at its specified interval.
DeleteDeletes the probe.
Because probes run as scheduled ColdFusion tasks, they will not run if the server on which they are hosted
crashes, or if the host web server crashes or otherwise does not respond.
System probes are available in ColdFusion Enterprise Edition only.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Code Analyzer page
The Code Analyzer page evaluates your ColdFusion pages for potential incompatibilities between ColdFusion 8
and previous versions of ColdFusion. It reviews the CFML pages that you specify and informs you of any potential
compatibility issues. Additionally, the Code Compatibility Analyzer detects unsupported and deprecated CFML
features, and outlines the required implementation changes that ensure a smooth migration
License Scanner page
The License Scanner page searches the local subnet to find other running instances of ColdFusion. You can use
this information to determine whether the ColdFusion instances within the subnet are licensed appropriately.
The ColdFusion Administrator uses universal datagram protocol (UDP) multicast to collect license and version
information from all ColdFusion instances running within the subnet.
Server Monitoring section
The Server Monitoring section lets you run the following:
• Server Monitor
33
• Multiserver Monitor
The Server Monitor is an Adobe Flash application that lets you track activities on a ColdFusion Server. You can
identify information about the server, including requests, queries, memory usage, and errors. You can start and
stop collecting server information and take snapshots of the server.
The Multiserver Monitor is another Flash application. It lets you track the status of several servers.
Extensions section
Use the Extensions section of the Administrator to configure ColdFusion to work with other technologies, such
as Java and CORBA.
The Extensions section contains the following pages:
• Java Applets page
• CFX Tags page
CHAPTER 3
34
Using the ColdFusion Administrator
• Custom Tag Paths page
• CORBA Connectors page
Java Applets page
The Java Applets page of the Administrator lets you register applets and edit and delete applet registrations. Before
you can use Java applets in your ColdFusion applications, you must register them in the Java Applets page.
When your applet is registered with ColdFusion, using the
cfapplet tag in your CFML code is simple, because
all parameters are predefined: Enter the applet source and the form variable name to use.
Note: Parameters set with the
cfapplet tag override parameters defined on the Java Applets page.
For more information, see the online help.
CFX Tags page
Before you can use a CFX tag in ColdFusion applications, you must register it. Use the CFX Tags page to register
and manage ColdFusion custom tags built with C++ and Java.
You can build CFX tags in the following two ways:
• Using C++ as a dynamic link library (DLL) on Windows or as shared objects (.so or .sl extension) on Solaris
and Linux
• Using Java interfaces defined in the cfx.jar file
For more information, see the online help.
Custom Tag Paths page
Use the Custom Tag Paths page of the Administrator to add, edit, and delete custom tag directory paths. The
default custom tag path is under the installation directory. To use custom tags in another path, register the path
on this Administrator page.
For more information, see the online Help.
CORBA Connectors page
Use the CORBA Connectors page to register, edit, and delete CORBA connectors. You must register CORBA
connectors before you use them in ColdFusion applications. You must also restart the server when you finish
configuring the CORBA connector.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
ColdFusion loads object request broker (ORB) libraries dynamically by using a connector, which does not restrict
ColdFusion developers to a specific ORB vendor. The connectors depend on the ORB runtime libraries provided
by the vendor. A connector for Borland Visibroker is embedded within ColdFusion. Make sure that the ORB
runtime libraries are in cf_root/runtime/lib (server configuration) or cf_webapp_root/WEB-INF/cfusion/lib
(multiserver and J2EE configurations).
The following table contains information about the libraries and connectors:
The Event Gateways section of the Administrator lets you configure event gateway settings, gateway types, and
gateway instances.
This Event Gateways section contains the following pages:
• Event Gateways Settings page
• Gateway Types page
• Gateway Instances page
CHAPTER 3
36
Using the ColdFusion Administrator
Event Gateways Settings page
The Event Gateways Settings page lets you configure settings for all event gateways, and start or stop the Short
Message Service (SMS) test server. The following table describes the settings:
OptionDescription
Enable ColdFusion Event
Gateway Services
Event Gateway Processing
Threads
Maximum Number Of
Events To Queue
Start/Stop SMS Test Server Starts and stops the short message service (SMS) test server.
Specifies whether the service is enabled. Changing this setting restarts the service.
Specifies the maximum number of threads used to execute ColdFusion functions
when an event arrives. A higher number uses more resources, but increases event
throughput.
Specifies the maximum number of events allowed on the event queue. If the queue
length exceeds this value, gateway events will not be added to the processing queue.
Gateway Types page
The Gateways Types pages lets you configure the types of gateways available on your system. After you configure
a type, you can create any number of gateway instances of that type. The following table describes the event
gateway types that ColdFusion includes:
Gateway typeDescription
CFMLTriggers asynchronous events from ColdFusion.
DataManagementLets a ColdFusion application notify a Flex destination about changes in the data
DataServicesMessagingSends messages to and receive messages from Flex applications.
FMS GatewayModifies data through the ColdFusion application or the Flash client, and reflects
that the destination manages.
the change in the Flash Media Server shared object.
SMSUsed to send and receive SMS messages.
Configuring and Administering ColdFusion
Gateway typeDescription
SAMETIMEUsed to send and receive instant messages through Lotus SameTime.
ADOBE COLDFUSION 8
37
XMPPUsed to send and receive instant messages through the Extensible Messaging and
SamplesSample gateway types, including the following:
Presence Protocol (XMPP).
• DirectoryWatcher Watches a directory for file changes.
• JMS Acts as a Java Messaging Service consumer or producer.
• Socket Listens on a TCP/IP port.
Gateway Instances page
The Gateway Instances page lets you configure ColdFusion event gateway instances to direct events from various
sources to ColdFusion components (CFCs) that you have written. The following table describes the settings:
OptionDescription
Gateway IDA name for the event gateway instance. You use this value in the ColdFusion
Gateway TypeThe event gateway type.
CFC PathThe absolute path to the listener CFC that handles incoming messages.
Configuration File(Optional) Configuration file, if required for the event gateway instance.
Startup ModeThe event gateway startup status, as follows:
GetGatewayHelper and SendGatewayMessage functions.
• Automatic Start the event gateway when ColdFusion starts.
• Manual Do not start the event gateway with ColdFusion, but allow starting it
from the Gateway Instances page.
• Disabled Do not allow the event gateway to start.
Security section
The Security section of the Administrator lets you configure the security frameworks of ColdFusion.
For more information on security, see “Administering Security” on page 101.
CHAPTER 3
38
Using the ColdFusion Administrator
The Security section contains the following pages:
• Administrator page
• RDS page
• Sandbox Security page
• User Manager page
Administrator page
Use the Administrator page of the Administrator to enable and disable password-restricted access to the Administrator, and to change the Administrator password. Restrict ColdFusion Administrator access to trusted users.
You can also specify whether to have all users use a single ColdFusion Administrator password or to allow only
users defined in the User Manager and the root administrative user to have access to the ColdFusion Administrator.
RDS page
Use the RDS page to enable and disable password-restricted RDS access to server resources from Macromedia
Dreamweaver MX from Adobe, Macromedia HomeSite+ from Adobe Systems Incorporated, ColdFusion Extensions for Eclipse, or the ColdFusion Report Builder, and to change the RDS password. You can also specify
whether to have all users use a single RDS password, or to allow only users defined in the User Manager to have
access through RDS.
Sandbox Security page
You use the Sandbox Security page (called Resource Security in the Standard Edition) to specify security permissions for data sources, tags, functions, files, and directories.
Sa ndbo x sec ur ity uses th e lo cati on of you r Col dFu sion page s to d eter mine fu nct iona lity. A sandbox is a designated
area (CFM files or directories that contain CFM files) of your site to which you apply security restrictions. By
default, a subdirectory (or child directory) inherits the sandbox settings of the directory one level above it (the
parent directory). If you define sandbox settings for a subdirectory, you override the sandbox settings inherited
from the parent directory.
Use sandbox security to control access to the following:
• Data sources
• Ta gs
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
• Functions
• Files and directories
• IP addresses and ports
Note: If you have enabled sandbox security and want to use the Administrator API, you must enable access to the
CFIDE/adminapi directory.
User Manager page
Use the User Manager page to specify the username, password, description, access rights, sandboxes, and allowed
roles for individual users. This page is especially useful for web hosting when multiple ColdFusion applications
are on one server, each maintained by a different user or organization.
You can grant access to the ColdFusion Administrator, which also grants access to the Administrator API.
If the administrator revokes a user’s role while the user is logged in, there is no effect; the revocation takes effect
when the user logs in again.
The default administrator user ID is admin. To change the administrator user ID, add the following in the neosecurity.xml file, replacing admin with the user ID to use:
<var name='admin.userid.root'>
<string>admin</string>
</var>
39
Packaging and Deployment section
The Packaging and Deployment section of the Administrator lets you create and deploy CAR files and create J2EE
EAR or WAR files that include an existing ColdFusion application and the ColdFusion runtime system
This Packaging and Deployment section contains the following pages:
• ColdFusion Archives page
• J2EE Archives page
CHAPTER 3
40
Using the ColdFusion Administrator
ColdFusion Archives page
The ColdFusion Archives page includes tools that let you archive and deploy ColdFusion applications, configuration settings, data source information, and other types of information to back up your files quickly and easily.
The complete list of archivable information includes the following:
• Name and file location
• Server settings
• ColdFusion mappings
• Data sources
• Verity collections
• Scheduled tasks
• Event gateway instances
• Java applets
• CFX tags
• Archive to do lists
After you archive the information, you can use the Administrator to deploy your web applications to the same
ColdFusion server or to a ColdFusion server running on a different computer. Additionally, you can use these
features to deploy and receive any ColdFusion archive file electronically.
The Archive Settings page lets you configure various archive system settings that apply to all archive and
deployment operations. For more information, see the online help.
J2EE Archives page
The J2EE Archives page lets you create an enterprise application archive (EAR) file or web application archive
(WAR) file that contains the following items:
• The ColdFusion web application.
• Server settings, such as data sources and custom tag paths.
• Your application’s CFML pages, stored in the ColdFusion web application’s root directory.
With this EAR or WAR file, a J2EE administrator can deploy your ColdFusion MX application to a J2EE application server.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
If you are creating a cluster of server instances when running the multiserver configuration, use this page to create
the WAR or EAR file to be used when creating each of the servers in the cluster.
You can create a J2EE archive regardless of whether you are running ColdFusion MX in the server configuration
or the J2EE configuration. However, you must be running the J2EE configuration to deploy an EAR or WAR file.
Enterprise Manager section
The Enterprise Manager section of the Administrator lets you create JRun server instances with ColdFusion
already deployed, register remote JRun server instances, and create clusters of JRun server instances.
Note: The Enterprise Manager section appears only if you install the multiserver configuration. It does not display in
the server configuration. Nor does it display when running in a J2EE configuration (other than that deployed in the
cfusion server of the multiserver configuration).
The Enterprise Manager section contains the following pages:
• Instance Manager page
• Cluster Manager page
41
Instance Manager page
The Instance Manager page lets you view the local and remote JRun servers that can be accessed by a cfusion
server running in the multiserver configuration.
Fr om t his p age y ou c an ac cess page s that def ine ne w, lo ca l, J Run se rver s and reg iste r exis ting JRu n ser ve rs r un nin g
on remote computers, as follows:
Add New Instance Create a new JRun server and automatically deploy a copy of the current ColdFusion MX
application into that server. Alternatively, you can deploy ColdFusion MX applications packaged using the J2EE
Archives page.
Register Remote Instance Define an existing remote JRun server to the Instance Manager for the purpose of
adding these servers to a cluster. The remote JRun server instance need not be running when you define it to the
Instance Manager, however, it must be running before you can add it to a cluster.
CHAPTER 3
42
Using the ColdFusion Administrator
Cluster Manager page
The Cluster Manager page in ColdFusion MX Administrator lets you create and manage clusters of JRun servers,
each containing the same ColdFusion MX application.
Custom Extensions section
You can extend the functionality of the ColdFusion Administrator by adding links to other web applications and
sites. These links appear under the Custom Extensions section in the left navigation pane of the Administrator.
Extend the Administrator
1 Create a file that contains the HTML link code, followed by a <BR>, with a separate line for each link. Do not
include other HTML code, such as
The
target attribute is required for each link; if you specify target="content", the page appears in the
main pane of the Administrator. If you specify any other value for the
new window.
2 Save this file as extensionscustom.cfm in the Administrator root directory (/CFIDE/administrator/).
For example, the following file adds links for Bowdoin College, Universidad Complutense de Madrid, and La
Sapienza:
Alternatively, you can extend the ColdFusion Administrator by editing the wwwroot/CFIDE/administrator/custommenu.xml file.
Administrator API
You can use the Administrator API to perform most ColdFusion Administrator tasks programmatically. The
Administrator API consists of a set of ColdFusion components (CFCs) that contain methods you call to perform
Administrator tasks. For example, you use the
setMSQL method of datasource.cfc to add a SQL Server data source.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
The CFCs for the Administrator API are located in the cf_web_root/CFIDE/adminapi directory, and each CFC
corresponds to an area of the ColdFusion Administrator, as the following table shows:
CFCDescription
43
accessmanager.cfcSpecify the username, password, description, access rights, sandboxes, and allowed
administrator.cfcContains basic Administrator functionality, including login, logout, the Migration
base.cfcBase object for all other Administrator API CFCs.
datasource.cfcAdd, modify, and delete ColdFusion data sources.
debugging.cfcManage debug settings.
eventgateway.cfcManage event gateways.
extensions.cfcManage custom tags, mappings, CFXs, applets, CORBA, and web services.
mail.cfcManage ColdFusion mail settings.
runtime.cfcManage runtime settings for fonts, cache, charts, configuration, and other settings.
security.cfcManage passwords, RDS, and sandbox security.
serverinstance.cfcStart, stop, and restart JRun servers. This CFC only works when running the multiserver
servermonitoring.cfcPerform many of the Server Monitor tasks programmatically.
roles for individual users.
Wizard, and the Setup Wizard. You must call the login method before calling any
other methods in the Administrator API.
configuration.
The adminapi directory also contains an Application.cfm file and two subdirectories.
Note: If you are using sandbox security, you must enable access to the cf_web_root/CFIDE/adminapi directory to use
the Administrator API.
There are two styles of methods in the Administrator API:
• Method arguments When setting complex or varied values, the Administrator API uses method arguments.
• Getting and setting simple values When setting simple values, such as true or false debug settings, the Admin-
istrator API uses get and set property methods.
To view the methods, method arguments, and documentation for the Administrator API CFCs, use the CFC
Explorer. For example, to view datasource.cfc when running in the server configuration, open a browser to
http://localhost:8500/CFIDE/adminapi/datasource.cfc.
CHAPTER 3
44
Using the ColdFusion Administrator
Use the Administrator API
Instantiate administrator.cfc:
1
<cfscript>
// Login is always required.
adminObj = createObject("component","cfide.adminapi.administrator");
Note: You can instantiate administrator.cfc and call the login method in a single line of code, as the following
example shows:
A data source is a complete database configuration that uses a JDBC driver to communicate with a specific
database. In Adobe ColdFusion, you must configure a data source for each database that you want to use. After
you configure a data source, ColdFusion can then communicate with that data source through JDBC.
For basic information on data sources and connecting to databases, click Resources in the ColdFusion Administrator, and then select Getting Started Experience.
JDBC is a Java Application Programming Interface (API) that you use to execute SQL statements. JDBC enables
an application, such as ColdFusion, to interact with a variety of database management systems (DBMSs), without
using interfaces that are database- and platform-specific.
CHAPTER 4
48
Data Source Management
The following table describes the four types of JDBC drivers:
TypeNameDescription
1JDBC-ODBC bridgeTranslates JDBC calls to ODBC calls, and sends them to the ODBC driver.
Advantages Allows access to many different databases.
Disadvantages The ODBC driver, and possibly the client database libraries,
must reside on the ColdFusion server computer. Performance is slower than other
JDBC driver types.
Adobe does not recommend this driver type unless your application requires
DBMS-specific features.
2Native-API/partly
Java driver
3JDBC-Net pure Java
driver
4Native-protocol/all-
Java driver
Converts JDBC calls to database-specific calls.
Advantages Better performance than Type 1 driver.
Disadvantages The vendor’s client database libraries must reside on the
same computer as ColdFusion.
ColdFusion includes a Type 2 driver for use with Microsoft Access Unicode databases.
Translates JDBC calls to the middle-tier server, which then translates the request
to the database-specific native-connectivity interface.
Advantages No need for vendor’s database libraries to be present on client
computer. Can be tailored for small size (faster loading).
Disadvantages Database-specific code must be executed in the middle tier.
ColdFusion includes an ODBC socket Type 3 driver for use with Microsoft Access
databases and ODBC data sources.
Converts JDBC calls to the network protocol used directly by the database.
Advantages Fast performance. No special software needed on the computer
on which you run ColdFusion.
Disadvantages Many of these protocols are proprietary, requiring a different
driver for each database.
ColdFusion includes Type 4 drivers for many popular DBMSs; however, not all
DBMSs are supported in ColdFusion Standard Edition.
JDBC drivers are stored in JAR files. For example, the JDBC drivers that are supplied with ColdFusion are in the
_drivers.jar file. If you are using another JDB C driver, you must store it in the ColdFusion classpath. For example,
cf_root/cfusion/lib (server configuration) or cf_webapp_root/WEB-INF/cfusion/lib (multiserver or J2EE configuration).
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Supplied drivers
The following table lists the database drivers supplied with ColdFusion and where you can find more information
about them:
DriverTypeFor more information
Apache Derby Client“Connecting to Apache Derby Client” on page 52
Apache Derby Embedded“Connecting to Apache Derby Embedded” on page 53
DB2 Universal Database4“Connecting to DB2 Universal Database” on page 55
DB2 OS/3904“Connecting to other data sources” on page 71
Informix4“Connecting to Informix” on page 56
Microsoft Access3“Connecting to Microsoft Access” on page 58
Microsoft Access with Unicode support 2“Connecting to Microsoft Access with Unicode” on page 60
Microsoft SQL Server4“Connecting to Microsoft SQL Server” on page 62
MySQL4“Connecting to MySQL” on page 65
ODBC Socket3“Connecting to ODBC Socket” on page 67
49
Oracle4“Connecting to Oracle” on page 69
Other“Connecting to other data sources” on page 71
Sybase4“Connecting to Sybase” on page 74
To see a list of database versions that ColdFusion supports, go to www.adobe.com/go/sysreqscf.
When running in the J2EE configuration, the ColdFusion Administrator also lets you configure a data source that
connects to a JNDI data source. A Java Naming and Directory Interface (JNDI) data source is equivalent to a
ColdFusion data source, except you define it by using your J2EE application server. After it’s defined, ColdFusion
applications use it as they would any data source. For information on defining a JNDI data source, see
“Connecting to JNDI data sources” on page 76.
CHAPTER 4
50
Data Source Management
Adding data sources
In the ColdFusion Administrator, you configure your data sources to communicate with ColdFusion. After you
add a data source to the Administrator, you access it by name in any CFML tag that establishes database connections; for example, in the cfquery tag. During a query, the data source tells ColdFusion which database to connect
to and what parameters to use for the connection.
The ColdFusion Administrator organizes all the information about a ColdFusion server’s database connections
in a single, easy-to-manage location. In addition to adding new data sources, you can use the Administrator to
specify changes to your database configuration, such as relocation, renaming, or changes in security permissions.
Adding data sources in the Administrator
You use the ColdFusion Administrator to quickly add a data source for use in your ColdFusion applications.
When you add a data source, you assign it a data source name (DSN) and set all information required to establish
a connection.
Note: ColdFusion includes data sources that are configured by default. You do not need the following procedure to
work with these data sources.
Add a data source
1 In the ColdFusion Administrator, select Data & Services > Data Sources.
2 Under Add New Data Source, enter a data source name; for example, MyTestDSN. The following names are
reserved; you cannot use them for data source names:
•service
•jms_provider
•comp
•jms
3 Select a driver from the drop-down list box; for example, Microsoft SQL Server.
4 Click Add.
A form for additional DSN information appears. The available fields in this form depend on the driver that
you selected.
5 In the Database field, enter the name of the database; for example, Northwind.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
6 In the Server field, enter the network name or IP address of the server that hosts the database, and enter any
required Port value; for example, the bullwinkle server on the default port.
7 If your database requires login information, enter your Username and Password.
Note: The omission of required username and password information is a common reason why a data source fails
to verify.
8 (Optional) Enter a Description.
9 (Optional) Click Show Advanced Settings to specify any ColdFusion specific settings; for example, to configure
which SQL commands can interact with this data source.
10 Click Submit to create the data source.
ColdFusion automatically verifies that it can connect to the data source.
11 (Optional) To verify this data source later, click the verify icon in the Actions column.
Note: To check the status of all data sources available to ColdFusion, click Verify All Connections.
Specifying connection string arguments
The ColdFusion Administrator lets you specify connection-string arguments for data sources. In the Advanced
Settings page, use the Connection String field to enter name-value pairs separated by a semicolon. For more information, see the documentation for your database driver.
51
Note: The
Guidelines for data sources
cfquery connectstring attribute is no longer supported.
When you add data sources to ColdFusion, keep the following guidelines in mind:
• Data source names should be all one word.
• Data source names can contain only letters, numbers, hyphens, and the underscore character (_).
• Data source names should not contain special characters or spaces.
• Although data source names are not case-sensitive, you should use a consistent capitalization scheme.
• Depending on the JDBC driver, connection strings and JDBC URLs might be case-sensitive.
• Use the Administrator to verify that ColdFusion can connect to the data source.
• A data source must exist in the ColdFusion Administrator before you use it on an application page to retrieve
data.
CHAPTER 4
52
Data Source Management
Connecting to Apache Derby Client
Use the settings in the following table to connect ColdFusion to Apache Derby Client:
SettingDescription
CF Data Source
Name
DatabaseThe name of the database.
ServerThe name of the server that hosts the database that you want to use. If the database is local,
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a
Description(Optional) A description for this connection.
Connection StringA field that passes database-sp ecific parameters, such as login credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source.
Restrict Connections To
Maintain Connections
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before
The data source name (DSN) that ColdFusion uses to connect to the data source.
enclose the word local in parentheses.
ColdFusion application does not supply a user name (for example, in a cfquery tag).
The user name must have CREATE PACKAGE privileges for the database, or the database
administrator must create a package. Consult the database administrator when configuring
this type of data source.
ColdFusion application does not supply a password (for example, in a cfquery tag).
If you enable this option, use the Restrict Connections To field to specify the maximum.
Specifies the maximum number of database connections for the data source. To use this
restriction, you must enable the Limit Connections option.
ColdFusion establishes a connection to a data source for every operation that requires one.
Enable this option to improve performance by caching the data source connection.
destroying it.
Disable Connections
Login Timeout (sec) The number of seconds before ColdFusion times out the attempt to log in to the data source
CLOBReturns the entire contents of any CLOB/ Text columns in the database for this data source. If
If selected, suspends all client connections.
connection.
unchecked, ColdFusion retrieves the number of characters specified in the Long Text Buffer
setting. For UDB 7.1 and 7.2, there is a 32K limit on CLOBs.
SettingDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
53
BLOB Returns the entire contents of any BLOB/Image columns in the database for this data source.
LongText Buffer
(chr)
BLOB Buffer (bytes) The default buffer size, used if the BLOB option is not selected. The default value is 64000
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connect ion from the pool is resued. This can slow query response time because
If unchecked, ColdFusion retrieves the number of characters specified in the BLOB Buffer
setting. BLOBs are not supported on UDB 7.1 and 7.2.
The default buffer size, used if the CLOB option is not selected. The default value is 64000
bytes.
bytes.
an additional query is generated. You should specify this just before restarting the database
to verify all connections, but remove the validation query after restarting the database to
avoid any performance loss.
Connecting to Apache Derby Embedded
Use the settings in the following table to connect ColdFusion to Apache Derby Embedded:
SettingDescription
CF Data Source
Name
Database folderThe folder where the database is located.
The data source name (DSN) that ColdFusion uses to connect to the data source.
Create DatabaseSelect this option to create a database. The new database exists in the path specified in the
Description(Optional) A description for this connection.
ColdFusion Username
ColdFusion Password
Connection StringA field that passes database-specific parameters, such as l ogin credentials, to the data source.
Database Folder. If the database already exists, a SQL warning is generated, and a connection
to the existing database is established.
The username you use to log in to the ColdFusion Administrator.
The password you use to log in to the ColdFusion Administrator.
CHAPTER 4
54
Data Source Management
SettingDescription
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data source.
Maintain Connections
Max Pooled Statements
If you enable this option, use the Restrict Connections To field to specify the maximum.
ColdFusion establishes a connection to a data source for every operation that requires one.
Enable this option to improve performance by caching the data source connection.
Select this option to reuse prepared statements (that is, stored procedures and queries that
use the cfqueryparam tag). Although you tune this setting based on your application, start by
setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before
Disable Connections
Login Timeout (sec) The number of seconds before ColdFusion times out the attempt to log in to the data source
CLOBReturns the entire contents of any CLOB/ Text columns in the database for this data source. If
BLOB Returns the entire contents of any BLOB/Image columns in the database for this data source.
LongText Buffer
(chr)
destroying it.
If selected, suspends all client connections.
connection.
unchecked, ColdFusion retrieves the number of characters specified in the Long Text Buffer
setting. For UDB 7.1 and 7.2, there is a 32K limit on CLOBs.
If unchecked, ColdFusion retrieves the number of characters specified in the BLOB Buffer
setting. BLOBs are not supported on UDB 7.1 and 7.2.
The default buffer size, used if the CLOB option is not selected. The default value is 64000
bytes.
BLOB Buffer (bytes) The default buffer size, used if the BLOB option is not selected. The default value is 64000
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connec tion from the pool is resued. This can slow query response time because
bytes.
an additional query is generated. You should specify this just before restarting the database
to verify all connections, but remove the validation query after restarting the database to
avoid any performance loss.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Connecting to DB2 Universal Database
For information on defining data sources that work with DB2 for OS/390 or iSeries, see “Connecting to other data
sources” on page 71. To see a list of DB2 versions that ColdFusion supports, go to www.adobe.com/go/sysreqscf.
Note: DB2 Universal Database (UDB) refers to all versions of DB2 running on Windows, UNIX, and Linux/s390
platforms.
Use the settings in the following table to connect ColdFusion to DB2:
SettingDescription
55
CF Data Source
Name
DatabaseThe name of the database.
ServerThe name of the server that hosts the database that you want to use. If the database is local,
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as l ogin credentials, to the data source.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connecti ons for the data source.
Restrict Connections To
Maintain Connections
The data source name (DSN) that ColdFusion uses to connect to the data source.
enclose the word local in parentheses.
ColdFusion application does not supply a user name (for example, in a cfquery tag).
The user name must have CREATE PACKAGE privileges for the database, or the database
administrator must create a package. Consult the database administrator when configuring
this type of data source.
ColdFusion application does not supply a password (for example, in a cfquery tag).
If you enable this option, use the Restrict Connections To field to specify the maximum.
Specifies the maximum number of database connections for the data source. To use this
restriction, you must enable the Limit Connections option.
ColdFusion establishes a connection to a data source for every operation that requires one.
Enable this option to improve performance by caching the data source connection.
CHAPTER 4
56
Data Source Management
SettingDescription
Max Pooled Statements
Enables reuse of prepared statements (that is, stored procedures and queries that use the
cfqueryparam tag). Although you tune this setting based on your application, start by
setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source
Disable Connections
Login Timeout (sec) The number of seconds before ColdFusion times out the attempt to log in to the data source
CLOBReturns the entire contents of any CLOB/Text columns in the database for this data source. If
BLOB Returns the entire contents of any BLOB/Image columns in the database for this data source.
LongText Buffer
(chr)
BLOB Buffer (bytes) The default buffer size, used if the BLOB option is not selected. The default value is 64000
destroying it.
connections to close.
If selected, suspends all client connections.
connection.
unchecked, ColdFusion retrieves the number of characters specified in the Long Text Buffer
setting. For UDB 7.1 and 7.2, there is a 32K limit on CLOBs.
If unchecked, ColdFusion retrieves the number of characters specified in the BLOB Buffer
setting. BLOBs are not supported on UDB 7.1 and 7.2.
The default buffer size, used if the CLOB option is not selected. The default value is 64000
bytes.
bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connec tion from the pool is resued. This can slow query response time because
an additional query is generated. You should specify this just before restarting the database
to verify all connections, but remove the validation query after restarting the database to
avoid any performance loss.
Connecting to Informix
To see a list of Informix versions that ColdFusion supports, go to www.adobe.com/go/sysreqscf. Use the settings
in the following table to connect ColdFusion to Informix data sources:
SettingDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
57
CF Data Source
Name
DatabaseThe database to which this data source connects.
Informix ServerThe name of the Informix database server to which you want to connect.
ServerThe name of the server that hosts the database. If the database is local, enclose the word
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this
Maintain Connections
The data source name (DSN) that ColdFusion uses to connect to the data source.
local in parentheses.
ColdFusion application does not supply a user name (for example, in a cfquery tag).
ColdFusion application does not supply a password (for example, in a cfquery tag).
source.
source. If you enable this option, use the Restrict Connections To field to specify the
maximum.
restriction, you must enable the Limit Connections option.
ColdFusion establishes a connection to a data source for every operation that requires one.
Enable this option to improve performance by caching the data source connection.
Max Pooled Statements
Enables reuse of prepared statements (that is, stored procedures and queries that use the
cfqueryparam tag). Although you tune this setting based on your application, start by
setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source
Disable Connections If selected, suspends all client connections.
destroying it.
connections to close.
CHAPTER 4
58
Data Source Management
SettingDescription
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for this data
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data
LongText BufferThe default buffer size, used if the CLOB option is not selected. The default value is 64000
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is 64000
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time
attempt.
source. If not selected, ColdFusion retrieves the number of characters specified in the Long
Text Buffer setting.
source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB
Buffer setting.
bytes.
bytes.
because an additional query is generated. You should specify this just before restarting the
database to verify all connections, but remove the validation query after restarting the database to avoid any performance loss.
Connecting to Microsoft Access
Use the settings in the following table to connect ColdFusion to Microsoft Access data sources:
SettingDescription
CF Data Source
Name
Database FileThe file that contains the database.
System Database File To secure access to the specified database file, click Browse Server to locate and enter a data-
Use Default Username
The data source name (DSN) used by ColdFusion to connect to the data source.
base that contains database security information. The system database is usually located in
the same directory as the MDB file or in the windows\system32\system.mdw directory.
If selected, ColdFusion does not pass a user name or password when requesting a connection. The Microsoft Access driver uses the default user name and password.
SettingDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
59
ColdFusion Username
ColdFusion Password The password that ColdFusion passes to the JDBC driver to connect to the data source if a
Description(Optional) A description for this connection.
Page TimeoutThe number of milliseconds before a request for a ColdFusion page times out. The default is
Max Buffer SizeThe size of the internal buffer, in kilobytes, that Access uses to transfer data to and from the
Connection StringA field that passes database-specific parameters, such as login credentials, to the data
Default UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a
Default PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a
Return Timestamp as
String
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this
The user name that ColdFusion passes to the JDBC driver to connect to the data source if a
ColdFusion application does not supply a user name (for example, in a cfquery tag).
ColdFusion application does not supply a password (for example, in a cfquery tag).
600. If you observe excessive network activity when using this driver, increase the page timeout value.
disk. The default buffer size is 2048 KB. Specify an integer value divisible by 256.
source.
ColdFusion application does not supply a user name (for example, in a cfquery tag).
ColdFusion application does not supply a password (for example, in a cfquery tag).
Enable this setting if your application retrieves Date/Time data and then reuses it in SQL
statements without applying formatting (using functions such as DateFormat,
TimeFormat, and CreateODBCDateTime).
source. If you enable this option, use the Restrict Connections To field to specify the
maximum.
restriction, you must enable the Limit Connections option.
Maintain Connections
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source
Disable Connections If selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login
ColdFusion establishes a connection to a data source for every operation that requires one.
Enable this option to improve performance by caching the data source connection.
destroying it.
connections to close.
attempt.
CHAPTER 4
60
Data Source Management
SettingDescription
CLOBReturns the entire contents of any CLOB/ Text columns in the database for this data source.
BLOB Returns the entire contents of any BLOB/ Image columns in the database for this data source.
LongText BufferThe default buffer size, used if the CLOB option is not selected. The default value is 64000
BLOB BufferThe default buffer size, used if the BLOB option is not selected. The default value is 64000
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time
If not selected, ColdFusion retrieves the number of characters specified in the Long Text
Buffer setting.
If unchecked, ColdFusion retrieves the number of characters specified in the BLOB Buffer
setting.
bytes.
bytes.
because an additional query is generated. You should specify this just before restarting the
database to verify all connections, but remove the validation query after restarting the database to avoid any performance loss.
Connecting to Microsoft Access with Unicode
Use the settings in the following table to connect ColdFusion to Microsoft Access with Unicode data sources (this
is a Type 2 driver):
SettingDescription
CF Data Source
Name
Database FileThe file that contains the database.
Description(Optional) A description for this connection.
ColdFusion Username
ColdFusion Password The password that ColdFusion passes to the JDBC driver to connect to the data source if a
Page TimeoutThe time (in tenths of a second) before a request for a ColdFusion page times out.
The data source name (DSN) that ColdFusion uses to connect to the data source.
The user name that ColdFusion passes to the JDBC driver to connect to the data source if a
ColdFusion application does not supply a user name (for example, in a
ColdFusion application does not supply a password (for example, in a cfquery tag).
cfquery tag).
SettingDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
61
Max Buffer SizeThe size of the internal buffer, in kilobytes, used by Microsoft Access to transfer data to and
Connection StringA field that passes database-specific parameters, such as login credentials, to the data
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this
Maintain Connections
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source
Disable Connections If selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for this data
BLOB Select to ret urn the entire contents of any BLOB/Image columns in the database for this data
from the disk. Can be any integer value divisible by 256.
source.
source. If you enable this option, use the Restrict Connections To field to specify the
maximum.
restriction, you must enable the Limit Connections option.
ColdFusion establishes a connection to a data source for every operation that requires one.
Enable this option to improve performance by caching the data source connection.
destroying it.
connections to close.
attempt.
source. If not selected, ColdFusion retrieves the number of characters specified in the Long
Text Buffer setting.
source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB
Buffer setting.
LongText BufferThe default buffer size, used if the CLOB option is not selected. The default value is 64000
BLOB BufferThe default buffer size, used if the BLOB option is not selected. The default value is 64000
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time
bytes.
bytes.
because an additional query is generated. You should specify this just before restarting the
database to verify all connections, but remove the validation query after restarting the database to avoid any performance loss.
CHAPTER 4
62
Data Source Management
Note: This driver uses the Microsoft Jet list of reserved words, including the word Last. For a complete list, see
http://support.microsoft.com/?kbid=248738.
Connecting to Microsoft SQL Server
To s ee a list of SQ L S erve r ver sion s th at Col dFu sion sup por ts , go to www.adobe.com/go/sysreqscf. Use the settings
in the following table to connect ColdFusion to SQL Server:
SettingDescription
CF Data Source
Name
DatabaseThe database to which this data source connects.
ServerThe name of the server that hosts the database that you want to use. If the database is local,
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data source if a
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data source if a
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the data
Select MethodDetermines whether server cursors are used for SQL queries.
The data source name (DSN) that ColdFusion uses to connect to the data source.
enclose the word local in parentheses. If you are running SQL Server locally (or using MSDE),
specify 127.0.0.1 for the
server name instead of the actual instance name.
ColdFusion application does not supply a user name (for example, in a cfquery tag).
ColdFusion application does not supply a password (for example, in a cfquery tag).
source.
• The Direct method provides more efficient retrieval of data when you retrieve record sets
in a forward-only direction and you l imit your SQL Server connection to a single open SQL
statement at a time. This is typical for ColdFusion applications.
• The Cursor method lets you have multiple open SQL statements on a connection. This is
not typical for ColdFusion applications, unless you use pooled statements.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the data
source. If you enable this option, use the Restrict Connections To field to specify the
maximum.
SettingDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
63
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use this
Maintain Connections
String FormatEnable this option if your application uses Unicode data in DBMS-specific Unicode
Max Pooled Statements
restriction, you must enable the Limit Connections option.
ColdFusion establishes a connection to a data source for every operation that requires one.
Enable this option to improve performance by caching the data source connection.
datatypes, such as National Character or nchar.
Enables reuse of prepared statements (that is, stored procedures and queries that use the
cfqueryparam tag). Although you tune this setting based on your application, start by
setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data source
Disable Connections If selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection login
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for this data
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for this data
destroying it.
connections to close.
attempt.
source. If not selected, ColdFusion retrieves the number of characters specified in the Long
Text Buffer setting.
source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB
Buffer setting.
LongText BufferThe default buffer size, used if Enable Long Text Retrieval (CLOB) is not selected. The default
BLOB BufferThe default buffer size, used if the BLOB option is not selected. The default value is
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response time
value is 64000 bytes.
64000
bytes.
because an additional query is generated. You should specify this just before restarting the
database to verify all connections, but remove the validation query after restarting the database to avoid any performance loss.
CHAPTER 4
64
Data Source Management
Settings for the Northwind sample database
Previous versions of SQL Server included a sample database named Northwind. Establishing a connection to the
Northwind database can help you learn ColdFusion while using a familiar database.
To establish a connection to the SQL Server Northwind database, you must set up the database int he SQL Server
Enterprise manager and in the ColdFusion MX Administrator.
Set up the database in the SQL Server Enterprise manager
Expand the server group.
1
2 Expand the server.
3 Under the Security folder, right-click on Logins.
4 Select New Login.
5 Select Windows Authentication or SQL Server Authentication settings.
6 Select the Northwind database, and specify the language.
7 Ensure that the database server is using mixed authentication. While in Enterprise Manager, right click on the
server, select Properties > Security and then select the Security tab. Ensure that the SQL Server and Windows
radio button is clicked.
8 Click OK.
Set up the database in the ColdFusion Administrator
1 Open the ColdFusion Administrator.
2 Click Data & Services > Data Sources.
3 Typ e northwind in the Data Source Name field, and select Microsoft SQL Server in the Driver drop-down list
box.
4 Click Add.
5 Typ e Northwind in the Database Name field, 127.0.0.1 (or the database server IP address) in the Server field,
and 1433 in the Port field.
Note: Do not specify a user name or password when defining the data source.
6 Save the data source.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Troubleshooting SQL Server connections
If you are having trouble establishing a connection to SQL Server, review the following considerations:
1 If you installed SQL Server using a server name other than the default, you must use your chosen
domain\servername wherever there’s a reference to (local).
The following situations can cause a Connection Refused error:
• If you specified authentication information in SQL Server, ensure that you have not defined a username and
password in the ColdFusion data source.
• You are running a connection-limited version of SQL Server and the request exceeds the limit for TCP/IP
connections.
You can prevent this exception by setting the Limit Connections and Restrict Connections To options in
ColdFusion Administrator on the Advanced Settings page for the data sources, and specifying a number less
than the SQL Server maximum.
2 SQL Server does not enable the TCP/IP protocol. This problem can happen when SQL Server is on the same
computer as ColdFusion. To fix this problem, perform the following steps:
a In SQL Server Enterprise Manager, right-click on the name of your SQL Server and click Properties.
b Click Network Configuration and the General Tab.
c Move TCP/IP from the Disabled Protocols section to the Enabled Protocols section.
65
d Click OK.
e Restart the SQL Server services.
f Verify your data source.
3 If you have are having trouble connecting, consider using mixed-mode authentication for SQL Server
(Windows and SQL) and removing the user name and password from the ColdFusion data source.
Connecting to MySQL
To see a list of MySQL versions that ColdFusion supports, go to www.adobe.com/go/sysreqscf.
Note: By default, queries to MySQL data sources return isCaseSensitive = NO for each column in the return structure
from the
to turn on the calls to isCaseSensitive.
GetMetaData function. Set the system property -Dcoldfusion.mysql.enableiscasesensitive=true
CHAPTER 4
66
Data Source Management
Use the settings in the following table to connect ColdFusion to MySQL data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe database to which this data source connects.
ServerThe name of the server that ho sts the database that you want to use. If the database
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the
Restrict Connections ToSpecifies the maximum number of databa se connections for the data source. To use
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data
is local, enclose the word local in parentheses.
source, if a ColdFusion application does not supply a user name (for example, in a
cfquery tag).
source, if a ColdFusion application does not supply a password (for example, in a
cfquery tag).
data source.
data source. If you enable this option, use the Restrict Connections To field to
specify the maximum.
this restriction, you must enable the Limit Connections option.
requires one. Enable this option to improve performance by caching the data
source connection.
before destroying it.
source connections to close.
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the data source connection
login attempt.
SettingDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
67
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response
this data source. If not selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
default value is
64000 bytes.
time because an additional query is generated. You should specify this just before
restarting the database to verify all connections, but remove the validation query
after restarting the database to avoid any performance loss.
64000 bytes.
Connecting to ODBC Socket
Use the settings in the following table to connect ColdFusion to ODBC Socket data sources (this is a Type 3
driver):
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
ODBC DSNSelect the ODBC DSN to connect to ColdFusion.
Trusted ConnectionSpecifies whether to u se domain user account access to the database. Only valid for
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data
SQL Server.
source if a ColdFusion application does not supply a user name (for example, in a
cfquery tag).
source if a ColdFusion application does not supply a password (for example, in a
cfquery tag).
CHAPTER 4
68
Data Source Management
SettingDescription
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the
Return Timestamp as StringEnable this option if your application retrieves Date/Time data and then re-uses it in
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection
Interval (min )The time (in minutes) that the server waits be tween cycles to check for expired data
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for
data source.
SQL statements without applying formatting (using functions such as
DateFormat, TimeFormat, and CreateODBCDateTime).
data source. If you enable this option, use the Restrict Connections To field to
specify the maximum.
this restriction, you must enable the Limit Connections option.
requires one. Enable this option to improve performance by caching the data
source connection.
before destroying it.
source connections to close.
data source connection.
this data source. If not selected, ColdFusion retrieves the number of ch aracters specified in the Long Text Buffer setting.
BLOB Select to return the entire contents of any BLOB /Image columns in the database for
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The
this data source. If not selected, ColdFusion retrieves the number of ch aracters specified in the BLOB Buffer setting.
default value is 64000 bytes.
SettingDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
69
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response
64000 bytes.
time because an additional query is generated. You should specify this just before
restarting the database to verify all connections, but remove the validation query
after restarting the database to avoid any performance loss.
Connecting to Oracle
To see a list of Oracle versions that ColdFusion supports, go to www.adobe.com/go/sysreqscf. Use the settings in
the following table to connect ColdFusion to Oracle data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
SID NameThe Oracle System Identifier (SID) that refers to the instance of the Oracle database
ServerThe name of the server that hosts the database that you want to use. If the database
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data
software running on the server. The default value is ORCL.
is local, enclose the word local in parentheses.
source if a ColdFusion application does not supply a user name (for example, in a
cfquery tag).
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the
source if a ColdFusion application does not supply a password (for example, in a
cfquery tag).
data source.
data source. If you enable this option, use the Restrict Connections To field to specify
the maximum.
CHAPTER 4
70
Data Source Management
SettingDescription
Restrict Connections ToSpecifies the maximum number of database connections for the data so urce. To use
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that
Max Pooled StatementsEnables reuse of prepared statements (that is, stored procedures and queries that
this restriction, you must enable the Limit Connections option.
requires one. Enable this option to improve performance by caching the data source
connection.
use the cfqueryparam tag). Although you tune this setting based on your application, start by setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
The default value is 300.
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connection before
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the data
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for
destroying it.
source connections to close.
source connection.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is
Allowed SQLThe SQL operations that can interact with the current data source.
Validation queryCalled when a connection from the pool is resued. This can slow query response
default value is 64000 bytes.
64000 bytes.
time because an additional query is generated. You should specify this just before
restarting the database to verify all connections, but remove the validation query
after restarting the database to avoid any performance loss.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Connecting to other data sources
Use the settings in the following table to connect ColdFusion to data sources through JDBC drivers that do not
appear in the drop-down list of drivers:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
JDBC URLThe JDBC connection URL for this data source.
71
Driver ClassThe fully qualified class name of the driver. For example, com.inet.tds.TdsDriver. The
Driver Name(Optional) The name of the driver.
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that
Timeout (min)The number of minutes that ColdFusion MX maintains an unused connec tion before
JAR file that contains this class must be in a directory defined in the ColdFusion classpath.
source if a ColdFusion application does not supply a user name (for example, in a
cfquery tag).
source if a ColdFusion application does not supply a password (for example, in a
cfquery tag).
data source.
data source. If you enable this option, us e the Restrict Connections To field to specify
the maximum.
this restriction, you must enable the Limit Connections option.
requires one. Enable this option to improve performance by caching the data source
connection.
destroying it.
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data
Disable ConnectionsIf selected, suspends all client connections.
source connections to close.
CHAPTER 4
72
Data Source Management
SettingDescription
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the d ata
CLOBSelect to return the entire contents of any CLOB/Text columns in the database for this
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is
Allowed SQLThe SQL operations that can interact with the current data source.
source connection.
data source. If not selected, ColdFusion retrieves the number of characters specified
in the Long Text Buffer setting.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
default value is 64000 bytes.
64000 bytes.
For example, you can use the Other Data Sources option to define a data source for DB2 OS/390 or iSeries, using
the following settings:
Note: DB2 OS/390 refers to all supported versions of DB2 on OS/390 and z/OS platforms; DB2 iSeries refers to all
supported versions of DB2 on iSeries and AS/400.
For more information on DB2, see “Connecting to DB2 Universal Database” on page 55.
Connecting to PostgreSQL
To see a list of PostgreSQL versions that ColdFusion supports, go to www.adobe.com. Use the settings in the
following table to connect ColdFusion to PostgreSQL data sources:
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe database to which this data source connects.
73
ServerThe name of the server that hosts the database that you want to use. If the database
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use
is local, enclose the word local in parentheses. This name must be either a fully qualified domain name (resolvable through DNS) or an IP address. It cannot be a netbios
name (even if you are running NBT), or an alias you set up using the client connectivity wizard (both of these approaches worked in earlier ColdFusion versions).
source if a ColdFusion application does not supply a user name (for example, in a
cfquery tag).
source if a ColdFusion application does not supply a password (for example, in a
cfquery tag).
data source.
data source. If you enable this option, us e the Restrict Connections To field to specify
the maximum.
this restriction, you must enable the Limit Connections option.
CHAPTER 4
74
Data Source Management
SettingDescription
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that
Timeout (min)The number of minutes that ColdFusion MX maintains an unus ed connection before
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the d ata
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is
Allowed SQLThe SQL operations that can interact with the current data source.
Validation quer yCalled when a connection from the po ol is resued. This can slow query response time
requires one. Enable this option to improve per formance by caching the data source
connection.
destroying it.
source connections to close.
source connection.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
default value is 64000 bytes.
64000 bytes.
because an additional query is generated. You should specify this just before
restarting the database to verify all connections, but remove the validation query
after restarting the database to avoid any performance loss.
Connecting to Sybase
To see a list of Sybase versions that ColdFusion supports, go to www.adobe.com/go/sysreqscf. Use the settings in
the following table to connect ColdFusion to Sybase data sources:
Configuring and Administering ColdFusion
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
DatabaseThe database to which this data source connects.
ADOBE COLDFUSION 8
75
ServerThe name of the server that hosts the database that you want to use. If the database
PortThe number of the TCP/IP port that the server monitors for connections.
UsernameThe user name that ColdFusion passes to the JDBC driver to connect to the data
PasswordThe password that ColdFusion passes to the JDBC driver to connect to the data
Description(Optional) A description for this connection.
Connection StringA field that passes database-specific parameters, such as login credentials, to the
Select MethodDetermines whether server cursors are used for SQL queries.
is local, enclose the word local in parentheses. This name must be either a fully qualified domain name (resolvable through DNS) or an IP address. It cannot be a netbios
name (even if you are running NBT), or an alias you set up using the client connectivity wizard (both of these approaches worked in earlier ColdFusion versions).
source if a ColdFusion application does not supply a user name (for example, in a
cfquery tag).
source if a ColdFusion application does not supply a password (for example, in a
cfquery tag).
data source.
• The Direct method provides more efficient retrieval of data when you retrieve
record sets in a forward-only direction and you limit your Sybase connection to a
single open SQL statement at a time. This is typical for ColdFusion applications.
• The Cursor method lets you have multiple open SQL statements on a connection.
This is not typical for ColdFusion applications, unless you use pooled statements.
Limit ConnectionsSpecifies whether ColdFusion limits the number of database connections for the
data source. If you enable this option, us e the Restrict Connections To field to specify
the maximum.
Restrict Connections ToSpecifies the maximum number of database connections for the data source. To use
Maintain ConnectionsColdFusion establishes a connection to a data source for every operation that
this restriction, you must enable the Limit Connections option.
requires one. Enable this option to improve performance by caching the data source
connection.
CHAPTER 4
76
Data Source Management
SettingDescription
Max Pooled StatementsEnables reuse of prepared statements (that is, stored procedures and queries that
use the cfqueryparam tag). Although you tune this setting based on your application, start by setting it to the sum of the following:
• Unique cfquery tags that use the cfqueryparam tag
• Unique cfstoredproc tags
Timeout (min)The number of minutes that ColdFusion MX maintains an unus ed connection before
Interval (min)The time (in minutes) that the server waits between cycles to check for expired data
Disable ConnectionsIf selected, suspends all client connections.
Login Timeout (sec)The number of seconds before ColdFusion times out the attempt to log in to the d ata
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is
destroying it.
source connections to close.
source connection.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
default value is 64000 bytes.
64000 bytes.
Allowed SQLThe SQL operations that can interact with the current data source.
Validation quer yCalled when a connection from the po ol is resued. This can slow query response time
because an additional query is generated. You should specify this just before
restarting the database to verify all connections, but remove the validation query
after restarting the database to avoid any performance loss.
Connecting to JNDI data sources
Use the settings in the following table to connect ColdFusion to JNDI data sources that are defined for a J2EE
application server (multiserver and J2EE configurations only):
Configuring and Administering ColdFusion
SettingDescription
CF Data Source NameThe data source name (DSN) that ColdFusion uses to connect to the data source.
JNDI NameThe JNDI location in which the J2EE application server stores the data source.
ADOBE COLDFUSION 8
77
UsernameThe user name that ColdFusion passes to JNDI to connect to JNDI if a ColdFusion
PasswordThe password that ColdFusion passes to JNDI to connect to the data source if a Cold-
Description(Optional) A description for this connection.
JNDI Environment SettingsSpecifies additional JNDI environment settings, if required by the JNDI data source.
CLOBSelect to return the entire contents of any CLOB/ Text columns in the database for
BLOB Select to return the entire contents of any BLOB/ Image columns in the database for
LongText BufferThe default buffer size; used if Enable Long Text Retrieval (CLOB) is not selected. The
BLOB BufferThe default buffer size; used if the BLOB option is not selected. The default value is
Allowed SQLThe SQL operations that can interact with the current data source.
application does not supply a user name (for example, in a cfquery tag).
Fusion application does not supply a password (for example, in a
Use comma separated list of name/value pair. For example if you must specify a username and password to connect to JNDI, specify the following:
this data source. If not selected, ColdFusion retrieves the number of characters specified in the Long Text Buffer setting.
this data source. If not selected, ColdFusion retrieves the number of characters specified in the BLOB Buffer setting.
default value is 64000 bytes.
64000 bytes.
cfquery tag).
Note: The ColdFusion Administrator does not display the JNDI data source option when running in the server configuration.
Connecting to an external JDBC Type 4 data source
To us e a JDB C driver that i s not inc lude d with ColdFus ion (suc h as SQLAny whe re) y ou must confi gure it and ad d
a data source for it.
CHAPTER 4
78
Data Source Management
Connect to an external JDBC data source:
Copy the database driver .jar file to one of the following directories:
1
•(server configuration only) cf_root/lib
•(multiserver or J2EE configuration) cf_webapp_root/WEB-INF/cfusion/lib
2 Restart ColdFusion.
Note: In Windows, ensure that you restart all of the ColdFusion 8 services.
3 In the ColdFusion Administrator, add the other JDBC Type 4 data source, selecting Other from the Driver
drop-down list box.
For more information, see the chapter on data source management in Configuring and Administering ColdFusion.
You can now connect to an external JDBC Type 4 data source.
Chapter 5: Web Server Management
You can connect ColdFusion to the built-in web server and to external web servers, such as Apache, IIS, and Sun
ONE Web Server (formerly known as iPlanet).
ColdFusion lets you manage web servers when running in the server configuration, in the multiserver configuration, and when deploying on Macromedia JRun in the J2EE configuration. (Some J2EE application servers
include web server plug-ins that provide similar functionality.)
The web server is a critical component in your ColdFusion environment, and understanding how ColdFusion
interacts with web servers can help you administer your site. ColdFusion provides the following web server
options:
Built-in web server A lightweight, all-Java, HTTP 1.0 web server. Suitable for development but not intended for
use in production applications. For more information, see “Using the built-in web server” on page 79.
External web server A customized web server connector module that forwards requests for ColdFusion pages
from an external web server to ColdFusion. For more information, see “Using an external web server” on page 81.
Using the built-in web server
The ColdFusion server configuration is built on top of JRun, which includes the JRun web server (JWS), also
called the built-in web server. Although not intended for use in a production environment, the built-in web server
is particularly useful in the following cases:
CHAPTER 5
80
Web Server Management
Coexistence/transition The built-in web server lets you run a previous version of ColdFusion (using an external
web server) and ColdFusion (using the built-in web server) on the same computer while you migrate your existing
applications to ColdFusion.
Development If your workstation runs ColdFusion but does not run an external web server, you can still develop
and test ColdFusion applications locally through the built-in web server.
All web servers listen on a TCP/IP port, which you can specify in the URL. By default, web servers listen for HTTP
requests on port 80 (for example, http://www.adobe.com and http://www.adobe.com:80 are the same). Similarly,
port 443 is the default port for HTTPS requests.
By default in the server configuration, the built-in web server listens on port 8500. For example, to access the
ColdFusion Administrator through the built-in web server, specify http://servername:8500/CFIDE/adminis-
trator/index.cfm. In the multiserver configuration, the default port for the built-in web server is 8300.
Note: URLs are case-sensitive on UNIX operating systems.
If you enable the built-in web server during the installation process and the port is already in use, the installer
automatically finds the next-highest available port and configures the built-in web server to use that port. To
determine the port number used by the built-in web server, open the
cf_root/runtime/servers/coldfusion/SERVER-INF/jrun.xml file in a text editor and examine the
port attribute of
the WebService service. In the multiserver configuration, the path is jrun_root/servers/cfusion/SERVER-
INF/jrun.xml.
Note: When you install ColdFusion Enterprise Edition using the multiserver configuration, the installation wizard
always configures the built-in web server, even if you select an external web server.
Keep in mind the following when using the built-in web server:
• Whenever possible, configure your external web server as part of the ColdFusion installation, except for the
two cases mentioned at the beginning of this section (coexistence with a previous ColdFusion version, and
when the computer has no web server). If you select the built-in web server by mistake, run the Web Server
Configuration Tool manually to configure your external web server after the installation. For information
about the Web Server Configuration Tool, see “Web server configuration” on page 82.
• The default web root when using the built-in web server is cf_root/wwwroot (server configuration) or
jrun_root/servers/cfusion/cfusion-ear/cfusion-war (multiserver configuration). By default, the ColdFusion
Administrator (CFIDE directory) is under this web root.
• If you want the built-in web server to serve pages from a different web root directory, define a virtual mapping
in the cf_root/wwwroot/WEB-INF/jrun-web.xml file (jrun_root/servers/cfusion/cfusion-ear/cfusion-
war/WEB-INF/jrun-web.xml in the multiserver configuration), as the following example shows:
Important: If you have CFML pages under your external web server’s root, ensure that ColdFusion is configured to
serve these pages through the external web server. If you did not configure ColdFusion to use an external web server,
your external web server will serve ColdFusion Markup Language (CFML) source code for ColdFusion pages saved
under its web root.
Using an external web server
ColdFusion uses the JRun web server connector to forward requests from an external web server to the
ColdFusion runtime system.
When a request is made for a CFM page, the connector on the web server opens a network connection to the JRun
proxy service. The ColdFusion runtime system handles the request and sends its response back through the proxy
service and connector. The web server connector uses web-server-specific plug-in modules, as the following table
describes:
81
CHAPTER 5
82
Web Server Management
Web serverConnector details
ApacheThe Web Server Configuration Tool adds the following elements to the Apache
httpd.conf file:
• A LoadModule directive defines the connector.
• An AddHandler directive tells Apache to route requests for ColdFusion pages
through the connector.
For Apache 1.3.x, the connection module is mod_jrun.so; for Apache 2.x, the connection module is mod_jrun20.so.
IISThe Web Server Configuration Tool adds the following elements at either the global
level (default) or website level:
• An ISAPI filter (available on IIS 5 only).
• Extension mappings that tell IIS to route requests for ColdFusion pages through the
connector.
With IIS 5, the IIS connection module i s jrun.dll. IIS 6 uses a connection module named
jrun_iis6.dll and a helper DLL named jrun_iis6_wildcard.dll.
Sun ONE Web Server,
including iPlanet and
Netscape Enterprise Server
(NES)
The Web Server Configuration Tool adds the following elements to Sun ONE Web
Server configuration files:
• obj.conf A PathCheck directive for the JRun filter and ObjectType directives to
route requests for ColdFusion pages through the connector.
• magnus.conf Init directives to load and initialize the connector.
In Windows, the Sun ONE Web Server connection module is jrun_nsapi.dll; on UNIX,
the Sun ONE Web Server connection module is jrun_nsapi.so.
With iPlanet 4.x, the Web Server Configuration Tool places all settings in the obj.conf
file.
Web server configuration
ColdFusion uses the Web Server Configuration Tool to configure an external web server with the modules and
settings that the connector needs to connect to ColdFusion. You can run the Web Server Configuration Tool
through either the command-line interface or the graphical user interface (GUI). In either case, the Web Server
Configuration Tool configures your external web server to interact with a ColdFusion server.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Using GUI mode
The Web Server Configuration Tool includes a GUI mode, which you can use to specify external web server
configuration settings through a graphical interface.
Note: When you use the Web Server Configuration Tool in GUI mode, you must select the Configure Web Server for
ColdFusion Applications check box.
Run the Web Server Configuration Tool in GUI mode
Open a console window.
1
Note: In Windows, to start the Web Server Configuration Tool, select Start > Programs > Adobe > ColdFusion
> Web Server Configuration Tool.
8
2 Change to the cf_root/runtime/bin (server configuration) or jrun_root/bin (multiserver configuration)
directory.
3 Start the Web Server Configuration Tool using the wsconfig.exe (Windows) or wsconfig (UNIX) command.
The Web Server Configuration Tool window appears.
4 Click Add.
5 Select Configure Web Server For ColdFusion Applications.
83
6 In the Server drop-down list box, select the server or cluster name that you want to configure. (Individual
server names in a cluster do not appear. Clustering support is only available on the multiserver configuration.)
Note: The server or cluster does not have to reside on the web server computer. In this case, enter the IP address
or server name of the remote computer in the JRun Host field.
7 In the Web Server Properties area, enter web-server-specific information, and click OK.
8 (Optional) Move the CFIDE directory and other directories (such as cfdocs) from the built-in web server’s web
root to your web server root directory. In addition, you can copy your application’s CFM pages from the built-in
web server’s web root to your web server root directory.
Note: When a page is requested, the web server connector first looks for the ColdFusion page in the
cf_root/wwwroot (server configuration) or jrun_root/servers/cfusion/cfusion-ear/cfusion-war (multiserver
configuration) directory, and then looks under the web server root. Alternatively, you can use the command-line
interface and specify the -cfwebroot option.
CHAPTER 5
84
Web Server Management
9 (Optional) The web server connector does not serve static content (such as HTML files and images) from the
built-in web server’s root directory. If your ColdFusion web application has an empty context root (/) and you
want to ser ve pag es from t he bu ilt-in web s erver’s root d irector y, you can create a web ser ver mapping to th e corresponding directory under the built-in web server.
Using the command-line interface
You can also run the Web Server Configuration Tool through a command-line interface.
Run the command-line interface
1 Open a console window.
2 Change to the cf_root/runtime/bin (server configuration) or jrun_root/bin (multiserver configuration)
directory.
3 Execute the wsconfig.exe (Windows) or wsconfig (UNIX) command:
wsconfig.exe [-options]
./wsconfig [-options]
The following table describes the options:
OptionDescription
-ws
Specifies the web server, as follows:
• IIS
• Apache
• SunOne
• iPlanet
• NES
The web server name you supply is not case-sensitive.
-dir
-site
-host
-server
Specifies the path to the configuration directory (Apache conf or NES/iPlanet
config).
Specifies the IIS website name (case-sensitive). Specify All or 0 to configure the
connector at a global level, which applies to all IIS websites.
Specifies the ColdFusion server address. The default value is localhost.
Specifies the ColdFusion server name.
OptionDescription
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
85
-username
-password
-norestart
-cluster
-l
-a
-map .cfm,.cfc,.cfml,.cfr,
.cfswf,.jsp,.jws
-filter-prefix-only
-coldfusion
-upgrade
-service
-bin
Specifies a username defined to the JRun server. The default value is guest
.
account
Specifies a password that corresponds to -username. The default value is
guest account.
Specifies not to restart the web server.
Specifies the JRun cluster name. Use this option to define a connection to a
JRun cluster instead of a single server.
Enables verbose logging for the connector.
Enables native OS memory allocation.
Specifies the extension mappings list. (To use the web server connector with
ColdFusion, specify .cfm, .cfc, .cfml, .cfr, .cfswf, .jsp, .jws.)
(IIS 5 only) Sets ignoresuffixmap=true in the jrun.ini file. This means that
the connector module runs as an IIS extension.
Ensures that the proper ColdFusion mappings are set (.cfm, .cfml, .cfc, .cfswf,
.cfr, .jsp, .jws), and, if IIS, filter-prefix-only is implicitly specified.
Always use this option when you configure a web server for use with ColdFusion.
Upgrades existing configured connectors with newer modules from a newer
wsconfig.jar file.
Specifies the Apache Windows service name. The default value is Apache.
Specifies the path to the Apache server binary file (apache.exe in Windows,
httpd on UNIX).
-script
-v
-cfwebroot
-list
Specifies the path to the Apache UNIX control script file (apachectl, but
slightly different with certain Apache variants, such as Stronghold).
Enables verbose output from the Web Server Configuration Tool.
Specifies the directory corresponding to cf_root/wwwroot. If you use this
option, the Web Server Configuration Tool creates web server mappings for
/CFIDE and /cfdocs, each of which points to the corresponding directories
under cf_root/wwwroot. This option is useful in a multihoming or hosting
environment where you want multiple applications to share the ColdFusion
Administrator.
Lists all configured web servers.
CHAPTER 5
86
Web Server Management
OptionDescription
-list -host server-host
-remove
-uninstall
-h
Lists all JRun servers on the specified host.
Removes a configuration. Requires the -ws and either the -dir or -site
options.
Uninstalls all configured connectors.
Lists all parameters.
Using the batch files and shell scripts
The ColdFusion server configuration includes batch files and shell scripts that implement typical command-line
connector configurations. These files are in the cf_root/bin/connectors directory. For example, the
IIS_connector.bat file configures all sites in IIS to site 0, which establishes a globally defined connector so that all
sites inherit the filter and mappings.
If you use Apache or Sun ONE Web Server, use these files as prototypes, editing and saving them as appropriate
for your site.
Command-line interface examples
This section provides examples of multiple use-cases for different web servers:
The -cfwebroot option allows all sites to share the ColdFusion Administrator that runs under
C:\Inetpub\wwwroot. This example does not automatically configure newly added sites after the first
0
run, but you can rerun with -site 0 at a later time, and the Web Server Configuration Tool configures new
The Web Server Configuration Tool stores properties in configuration files, as follows:
IIS In the jrun.ini file, typically found in a subdirectory of the cf_root/runtime/lib/wsconfig (server configuration)
or jrun_root/lib/wsconfig (multiserver configuration) directory. For IIS 5 only, it also defines filter and extension
mappings in the IIS metabase.
87
Apache In the httpd.conf file, typically found in the apache_root/conf directory.
Sun ONE Web Server/iPlanet In the obj.conf and magnus.conf files, typically found in the ws_root/server-http-
xxx/config directory.
The following table describes the web server connector properties in the web server configuration files. The web
server connector uses these settings to help it find the ColdFusion server and know which servers to connect to.
CHAPTER 5
88
Web Server Management
PropertyDescription
bootstrapSpecifies the IP address and port on which the JRun server’s proxy service is listening for
serverstoreSpecifies the full path and filename of the file that contains information for the associated
verboseCreates more detailed web server log file entries for the connector. Enabling this option
scriptpath(IIS only) Points to the virtual /JRunScripts directory on the web server.
errorurl(Optional) Specifies the URL to a file that contains a customized error message. This prop-
ssl(Optional) Enables secure sockets layer (SSL) bet ween the web server and the JRun server.
apiallocEnables native operating-system memory allocation rathe r than the web server’s allocator
ignoresuffixmap(IIS only) Forces the connector to use application mappings.
proxyretryintervalSpecifies the number of seconds to wait before trying to reconnect to an unreachable
connector requests. JRun must also be configured to listen on this port and address
combination, the ProxyService must be activated, and the JRun server must be running.
Specify ipaddress:portnumber (for example, 127.0.0.1:51011).
JRun server. The connector creates this file automatically. The default filename is jrunserver.store.
can cause the web server’s log files to fill quickly. Specify true or false; the default value
is false. In Apache and Sun ONE Web Server, the connector writes to the error log configured for the web server; on IIS, the connector writes to its own log in the related wsconfig
subdirectory.
erty is commented out by default. You must restart the web server after enabling this
setting.
You must set this setting to false.
(for use on Solaris with Sun ONE, at the direction of Adobe Support staff ).
clustered server.
connecttimeoutSpecifies the number of seconds to wait on a socket connect to a JRun server.
recvtimeoutSpecifies the number of seconds to wait on a socket receive to a JRun server.
sendtimeoutSpecifies the number of seconds to wait on a socket send to a JRun server.
Each time you run the Web Server Configuration Tool, it creates a new configuration file and directory. For
example, the first time you run the tool in the server configuration, it creates files under
cf_root/runtime/lib/wsconfig/1; the second time, it creates cf_root/runtime/lib/wsconfig/2; and so on. Each of
these subdirectories contains the appropriate platform-specific connector module and web-server-specific
supporting files.
Configuring and Administering ColdFusion
ADOBE COLDFUSION 8
Sample configuration files
To help describe the web server configuration file parameters, this section provides examples of connectorspecific web server properties. These examples assume that JRun and the web server are on the same computer.
Apache configuration file
The following is a typical httpd.conf file for an installation of ColdFusion on the same computer as an Apache 2.0
web server:
# JRun Settings
LoadModule jrun_module "C:/coldfusion8/runtime/lib/wsconfig/1/mod_jrun20.so"
<IfModule mod_jrun20.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore "C:/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store"
JRunConfig Bootstrap 127.0.0.1:51011
#JRunConfig Errorurl <optionally redirect to this URL on errors>
#JRunConfig ProxyRetryInterval <number of seconds to wait before trying to reconnect to
unreachable clustered server>
#JRunConfig ConnectTimeout 15
#JRunConfig RecvTimeout 300
#JRunConfig SendTimeout 15
AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
</IfModule>
89
IIS configuration file
For IIS, the connector uses the jrun.ini file to initialize the jrun.dll file (jrun_iis6.dll on IIS 6). The following is a
typical jrun.ini file:
verbose=false
scriptpath=/JRunScripts/jrun.dll
serverstore=C:/coldfusion8/runtime/lib/wsconfig/1/jrunserver.store
bootstrap=127.0.0.1:51011
apialloc=false
ssl=false
ignoresuffixmap=true
#errorurl=<optionally redirect to this URL on errors>
#proxyretryinterval=<number of seconds to wait before trying to reconnect to unreachable
clustered server>
#connecttimeout=<number of seconds to wait on a socket connect to a JRun server>
CHAPTER 5
90
Web Server Management
#recvtimeout=<number of seconds to wait on a socket receive to a JRun server>
#sendtimeout=<number of seconds to wait on a socket send to a JRun server>
Netscape, iPlanet, or Sun ONE configuration file
The following is a typical obj.conf file for Netscape, iPlanet, or Sun ONE Web Server:
Note: Java must be disabled for the virtual server class that contains the server configured for JRun.
bootstrap="127.0.0.1:51011" verbose="true" apialloc="false" ssl="false"
ignoresuffixmap="false" #errorurl="<optionally redirect to this URL on errors>"
connecttimeout="15" recvtimeout="300" sendtimeout="15"
Multihoming
You typically use the Web Server Configuration Tool to configure a connection between the web server and
ColdFusion server running on the same computer. However, you can use the web server connector to route
requests to multiple virtual sites to a single ColdFusion server. This is known as multihoming.
In a multihomed environment, you have multiple virtual hosts (also known as virtual sites) connected to a single
ColdFusion server. You might use these virtual hosts for separate applications, such as Human Resources (HR),
payroll, and marketing, or for separate users in a hosting environment.
Note: You use web-server-specific methods to create separate virtual websites for each use.
Multihoming configuration tasks include the following:
91
Enabling access to the ColdFusion Administrator If any of the applications under a virtual host need to access the
ColdFusion Administrator, you must create a web server mapping (Alias directive in Apache) for /CFIDE that
points to the original CFIDE directory. Alternatively, you can copy the entire CFIDE directory to the virtual
website.
You can also configure the web server using the command-line Web Server Configuration Tool
-cfwebroot option,
which allows access to the CFIDE directory under the specified web root.
Enabling access to the cfform.js file If you do not create a web server mapping for /CFIDE, and any of the appli-
cations under a virtual host use the
cfform tag, you must enable the virtual host to find the JavaScript files under
the CFIDE/scripts directory. To enable access to the these scripts, use one of the following options:
• Copy the original_web_root/CFIDE/scripts directory to a CFIDE/scripts directory on your virtual host.
• Modify all cfform tags to use the scriptsrc attribute to specify the location of the cfform.js file.
Disabling the cacheRealPath attribute To ensure that ColdFusion always returns pages from the correct server,
disable Cache Web Server Paths in the Caching page of the ColdFusion Administrator. (When you use the multiserver configuration, set the
cacheRealPath attribute to false for the ProxyService in the
The procedures you perform to enable multihoming differ for each web server.
IIS
When you use IIS, you run the IIS Administrator to create additional websites and run the Web Server Configuration Tool. You store ColdFusion pages under the web root of each virtual website.
Connect multiple virtual sites on IIS to a single ColdFusion server
Use the IIS Administrator to create virtual websites, as necessary. The web root directory should enable read,
1
write, and execute access. For more information, see your IIS documentation.
2 Configure DNS for each virtual website, as described in your IIS documentation.
3 Test each virtual website to ensure that HTML pages are served correctly.
4 Run the Web Server Configuration Tool, as follows:
•GUI - Select IIS for the Web Server, select All from the IIS Web Site drop-down list box, and select the
Configure Web Server for ColdFusion Applications check box.
•Command line - Specify the -site 0 and -cfwebroot options, as the following server configuration
example shows:
cf_root/runtime/bin/wsconfig.exe -ws iis -site 0
-cfwebroot cf_root/wwwroot -coldfusion -v
5 Test each virtual website to ensure that ColdFusion pages are served correctly.
Apache
When you use Apache, you modify the apache_root/conf/httpd.conf file to create virtual hosts and run the Web
Server Configuration Tool. You store ColdFusion pages under the web root of each virtual website.
Connect multiple Apache virtual hosts on a web server to a single ColdFusion server
1
Configure DNS for each virtual website, as described in your web server documentation.
2 Open the apache_root/conf/httpd.conf file in a text editor and create virtual hosts, as necessary. For more infor-
mation, see your Apache documentation. For example:
3 Test each virtual host to ensure that HTML pages are served correctly.
4 Run the Web Server Configuration Tool, as follows:
•GUI - Specify Apache for the Web Server, specify the directory that contains the httpd.conf file, and select
the Configure Web Server for ColdFusion Applications check box.
•Command line - Specify -wsapache and the directory that contains the httpd.conf file, as the following
example shows:
cf_root/runtime/bin/wsconfig.exe -ws apache
-dir "c:\program files\apache group\apache2\conf"
-cfwebroot cf_root/wwwroot -coldfusion -v
93
For additional UNIX command-line examples, see “Using the command-line interface” on page 84.
The Web Server Configuration Tool updates the httpd.conf file. For a sample, see “Apache” on page 92.
5 Restart Apache. You store ColdFusion files for each virtual host in the directory specified by the Documen-
tRoot directive.
6 Test each virtual host to ensure that ColdFusion pages are served correctly.
Sun ONE Web Server, iPlanet, and Netscape
When you use Sun ONE Web Server version 6, you use the Server Administrator to create virtual servers and run
the Web Server Configuration Tool. You store ColdFusion pages under the web root of each virtual server.
Note: For earlier versio ns of Sun ON E/iPl anet and Net scape Enterpr ise Ser ver (N ES), you mus t creat e separate se rve r
instances for each site and run the Web Server Configuration Tool once for each site.
CHAPTER 5
94
Web Server Management
Connect multiple Sun ONE Web Server virtual hosts to a single ColdFusion server
Using the Sun ONE Web Server Administrator, create virtual web servers for ColdFusion to use. For more
1
information, see your Sun ONE Web Server documentation.
2 Configure DNS for each virtual website, as described in your web server documentation.
3 Test each virtual server to ensure that HTML pages are served correctly.
4 Run the Web Server Configuration Tool, as follows:
•GUI - Specify Netscape Enterprise Server/Sun ONE for the web server, specify the directory that contains
the obj.conf and magnus.conf files, and select the Configure Web Server for ColdFusion Applications check
box.
•Command line - Specify -wssunone and the directory that contains the obj.conf file, as the following
example shows:
cf_root/runtime/bin/wsconfig -ws sunone -dir [path to config]
-cfwebroot cf_root/wwwroot -coldfusion -v
5 Test each virtual server to ensure that ColdFusion pages are served correctly.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.