Saturday, December 15, 2007

Switching web server on ColdFusion

In case there is a need to switch from an external web server to the built-in ColdFusion web server, you can acheive this without reinstalling.

Switch from an external web server to the built-in web server

  1. Back up the jrun.xml file.

    This file is in the cf_root\runtime\servers\default\SERVER-INF directory in Windows, and in the cf_root/runtime/servers/default/SERVER-INF directory in UNIX.

  2. Open the original jrun.xml file for editing.
  3. Locate the WebService service and set the deactivated attribute to false:
    <service class="jrun.servlet.http.WebService" name="WebService">     <attribute name="port">8500</attribute>     <attribute name="interface">*</attribute>     <attribute name="deactivated">false</attribute>     ... </service> 

  4. Locate the ProxyService service and set the deactivated attribute to true:
    <service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">   <attribute name="activeHandlerThreads">8</attribute>   <attribute name="minHandlerThreads">1</attribute>   <attribute name="maxHandlerThreads">1000</attribute>   <attribute name="mapCheck">0</attribute>   <attribute name="threadWaitTimeout">20</attribute>   <attribute name="backlog">500</attribute>   <attribute name="deactivated">true</attribute> ... 

  5. Save the file.
  6. Copy the CFM pages in your web root directory (including the CFIDE and cfdocs directories) to the ColdFusion cf_root/wwwroot directory, and use appropriate URL references (for example, http://localhost:8500/YourApp1/index.cfm). If you switch from the built-in web server to an external web server, you must copy the contents of the cf_root/wwwroot directory to your web server root. If you are using Adobe Dreamweaver, ensure that you reconfigure any sites that you move from one server to another.
  7. Restart ColdFusion.


Tuesday, December 11, 2007

Function ArrayIsDefined() in CF8

This is a new function added in CF8, this function determines whether an array element is defined. This returns true, if the array element is defined (exists); false, otherwise.

Function syntax

ArrayIsDefiend(array, elementIndex)  





Name of a one dimensional array, or the array name and indexes into higher-order dimensions of a multidimensional array.


Index of the element in a one dimensional array, or the index of the element in the final dimension of a multidimensional array.


To test the existence of an element in a multidimensional array, specify all but the last dimension of the array in the first parameter. For example, the following line tests the existence of element MyArray[2][4][1]:

ArrayIsDefined(MyArray[2][4], 1)  


<h3>ArrayIsDefined Example</h3> <!--- Create a sparse new array. ---> <cfset MyArray = ArrayNew(1)> <!--- Populate an element or two. ---> <cfset MyArray[1] = "Test"> <cfset MyArray[3] = "Other Test">  <cfoutput>     <!--- Display the contents of the array. --->     <p>Your array contents are:     <cfdump var="#MyArray#"></p>          <!--- Check if an existing element is defined. --->     <p>Does element 3 exist?:&nbsp;     #ArrayIsDefined(MyArray, 3)#</p>          <!--- Check if a non-existent element is defined. --->     <p>Does element 2 exist?&nbsp;     #ArrayIsDefined(MyArray, 2)# </cfoutput> 

Monday, December 3, 2007

ColdFusion Security Fix

Adobe has released a security advisory for ColdFusion 7 and 8. This resolves an identified vulnerability that could potentially allow session hijacking for applications utilizing CFID or CFTOKEN. This does not apply to applications using J2EE Session management.

More details and how to get your ColdFusion server updated can be found on this link:

ColdFusion XMPP Support Updated

ColdFusion 7 and 8 includes an XMPP gateway, used for IM communication (to Jabber, Google Talk, and more). An update to the XMPP gateway is now available (for both ColdFusion 7 and 8), as explained in TechNote: Replacement file for XMPP Gateway.

ColdFusion 8 Cumulative Hot Fix 2 Available

The  second ColdFusion 8 cumulative hot fix pack has been released. This hot fix contains the 7 fixes from hot fix 1, plus 14 additional fixes.

ColdFusion 8 Doc HardCopy

You can now purchase the hardcopies of CF8 doc set on the Adobe store

The docs are also available online at free sources .


ColdFusion 8 Review on Macworld

Check out this "ColdFusion 8 Review" published on Macworld.

ColdFusion 8 for 64 bit

The CF Engineers are working to get ColdFusion 8 working on 64 Bit platforms. You can enroll yourself for prerelease program here.