Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1215

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
Enabling HTTPS access on the ColdFusion server
To use HTTPS to access the exchange server, you must have a valid client certificate in the JRE certificate store. If a
known authority did not issue the certificate on the Exchange server, install a certificate. The Java certificate store
already contains certificates from some authorities.
You can ask your system administrator to give you a certificate that you can install on the ColdFusion server, or you
can do the following:
Open Outlook Web Access in Internet Explorer and go to File->Properties.
1
2
Click the certificates button.
Click the Details tab and the 'Copy To File' button on the tab. Then follow the wizard options to save the certificate.
3
To install the certificate, run the following command using
keytool.exe -importcert -file <path_to_certificate_file> -keystore ..\lib\security\cacerts
Note: The
program requires you to enter a password. The default password is
keytool.exe
Using persistent connections
To open a persistent connection, you use the
address or URL, the user name, and the name of the connection (which you use in subsequent tags to specify the
connection). You typically also specify a password, and can specify several other attributes, including a proxy host or
a delegate mailbox ID. For details, see cfexchangeconnection in the CFML Reference.
Persistent connections use HTTP or HTTPS protocol with the
connections do not automatically close at the end of an HTTP request or ColdFusion page. Close the connection when
you are done using it. If you do not, ColdFusion retains the connection until an inactivity time-out period elapses, after
which, ColdFusion recovers the connection resources.
Note: You can store a connection in a persistent scope, such as the Application scope, and reuse it on multiple pages.
However, you get no advantage by doing so, because the connections are lightweight and you get no substantial
performance gain if you use a persistent scope.
The following example opens a connection, gets all mail sent from spamsource.com, and deletes the messages from the
Exchange server:
<cfexchangeConnection
action = "open"
username = "#user1#"
password = "#password1#"
server = "#exchangeServerIP#"
connection = "conn1">
<cfexchangemail action = "get" name = "spamMail" connection = "conn1">
<cfexchangefilter name = "fromID" value = "spamsource.com">
</cfexchangemail>
<cfloop query="spamMail">
<cfexchangemail action = "delete" connection = "conn1"
uid = "#spamMail.uid#">
</cfloop>
<cfexchangeConnection
action = "close"
connection = "conn1">
keytool.exe
tag and specify the
cfexchangeconnection
keepAlive
Last updated 1/20/2012
, which is in the jre\bin folder:
.
changeit
action, the server IP
open
property set to
. As a result, the
true
1210

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents