background image

24

Chapter 2:  Changes in ColdFusion MX 7

Using cfform in a multihomed environment

In ColdFusion 5, the 

cfform

 tag used inline JavaScript code for validation. In ColdFusion MX, 

cfform

 includes the CFIDE/scripts/cfform.js file, which contains all JavaScript. However, if your 

application runs in a hosted environment with multiple virtual websites, your virtual website may 
not contain a CFIDE directory, which causes JavaScript errors when using 

cfform

.

If you encounter this problem, use one of the following solutions:

Use the Default CFFORM ScriptSrc Directory field on the ColdFusion MX Administrator to 
specify the default path (relative to the web root) of the directory containing the cfform.js file.

Ask your hosting provider to provide a copy of cfform.js and change your cfform tags to use 
the 

scriptsrc

 attribute, specifying the location of this file. 

Ask your hosting provider to modify your virtual website to include a virtual mapping for the 
CFIDE directory.

The application.cfc file

The updated application framework in ColdFusion MX 7 lets you use a file named 
Application.cfc to control your application and keep track of application events. You use 
Application.cfc instead of Application.cfm. Application.cfc methods are triggered when 
application, sessions, and requests start or stop, and when the application encounters an 
exception. 

If your application already uses a file named Application.cfc, you must rename it.

Running multiple ColdFusion versions

If you run ColdFusion MX 7 alongside a previous ColdFusion version, only one version can use 
an external web server. In this case, use the built-in web server with ColdFusion MX 7 until you 
are ready to switch the external web server. At that point, run the Web Server Configuration Tool, 
as described in 

Configuring and Administering ColdFusion MX

.

Scheduler considerations

When you install ColdFusion MX 7 on a computer that is running a previous ColdFusion 
version, the ColdFusion Administrator automatically migrates a variety of settings, including 
scheduled tasks. If you run ColdFusion MX 7 alongside ColdFusion MX or ColdFusion MX 6.1, 
scheduled tasks with the same name can collide. To avoid this issue, open the ColdFusion 
Administrator and rename scheduled tasks for one version or the other.

Other changes in ColdFusion MX 7

This section describes changes and enhancements in ColdFusion MX 7. Many of these changes 
may result in changes to your applications. For a complete list of features, enhancements, and 
changes in ColdFusion MX 7, see the Release Notes at 

www.macromedia.com/go/

cfmx7_releasenotes

.

Содержание COLFUSION MX 7-MIGRATING APPLICATIONS TO COLDFUSION MX...

Страница 1: ...COLDFUSION MX7 Migrating Applications to ColdFusion MX 7...

Страница 2: ...Macromedia provides these links only as a convenience and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third party sites Co...

Страница 3: ...n management 11 QueryColumn object 11 Data type of query results 11 Localization and character handling 12 Extended character code and encoding support 12 Support for new currency formats 13 Changes t...

Страница 4: ...Running multiple ColdFusion versions 24 Other changes in ColdFusion MX 7 24 CHAPTER 3 Tag and Function Changes 33 Tag changes since ColdFusion 5 33 New tags attributes values and changes 34 Deprecate...

Страница 5: ...ongly encourages you to develop a migration plan for porting existing ColdFusion 5 applications to ColdFusion MX For more information see Planning your migration on page 6 Whether you encounter incomp...

Страница 6: ...igration strategy to meet your environment s needs This section contains two possible migration strategies following a discussion of web server differences in ColdFusion MX Web server considerations C...

Страница 7: ...http localhost 8300 CFIDE administrator index cfm When running in the J2EE configuration you use the web server capabilities of the underlying J2EE application server If you are using the built in web...

Страница 8: ...placing deprecated tags and using new functionality 10 Make the necessary changes to your ColdFusion application and run the application on your test computer Ensure that you test all application feat...

Страница 9: ...Server Configuration Tool for the web server used in production For more information see Installing and Using ColdFusion MX or Configuring and Administering ColdFusion MX b Rename the CFIDE directory...

Страница 10: ...nteract with databases for example to query write and update a database JDBC is an Application Programming Interface API for Java programs to access data To connect to Open Database Connectivity ODBC...

Страница 11: ...nagement For backward compatibility J2EE session management is disabled by default However you should enable this feature whenever possible For more information see Using Persistent Data and Locking i...

Страница 12: ...er set encoding This can affect the way that characters in the range 128 255 are displayed in the browser To restore the ColdFusion 5 default encoding place the following cfcontent tag in your page or...

Страница 13: ...latforms ColdFusion 5 uses Windows or UNIX locale formatting rules depending on the ColdFusion platform For information on Java standard locale formatting rules see the Java documentation for the Loca...

Страница 14: ...sion 5 this function had numerous errors where it used the wrong international currency designator For example in an English Australian locale LSCurrencyFormat 123456 78 international returned USD123...

Страница 15: ...1 3 docs api index html If you pass an invalid mask for example dd mm yymm LSDateFormat outputs the invalid characters in both ColdFusion 5 and ColdFusion MX However ColdFusion 5 delimits each charact...

Страница 16: ...tem from the JVM If the operating system has no set locale or if ColdFusion MX does not support the operating system s default locale GetLocale returns en_US English US ColdFusion MX sets the locale i...

Страница 17: ...ldFusion MX includes the following changes to variables You can no longer use a dot in a variable name because ColdFusion MX supports the dot notation as a dot operator to create a struct For example...

Страница 18: ...ion MX preserves the case of field names submitted by forms instead of forcing them to uppercase Like ColdFusion 5 ColdFusion MX ignores case when evaluating field names for example form myfield is th...

Страница 19: ...the following tag cfsetting RequestTimeout URL RequestTimeout For more information see the Reserved Words and Variables chapter in CFML Reference Definition of pi ColdFusion MX and ColdFusion 5 defin...

Страница 20: ...js and change your cfform tags to use the scriptsrc attribute specifying the location of this file Ask your hosting provide to modify your virtual website to include a virtual mapping for the CFIDE d...

Страница 21: ...gistry are subject to change Therefore you should not rely on registry keys that ColdFusion creates to store its system settings Using ListSort in ColdFusion MX When sorting with textnocase in a desce...

Страница 22: ...description column of the database CFQUERY NAME bookquery DATASOURCE book SELECT FROM book where bookid file CFQUERY CFOUTPUT QUERY bookquery url description BR cfindex collection snippets action upda...

Страница 23: ...configuration Multiserver configuration Enterprise Edition only Installs JRun and automatically deploys ColdFusion MX 7 in a separate JRun server instance This configuration contains the Enterprise M...

Страница 24: ...f Application cfm Application cfc methods are triggered when application sessions and requests start or stop and when the application encounters an exception If your application already uses a file na...

Страница 25: ...pression AS casttype function Support for the varchar concatenation operator Support for SQL and ODBC style dates inside a query of queries Size is no longer a reserved word when you create a query of...

Страница 26: ...s Web services enhancements and changes include the following The CreateObject function and the port attribute of the cfcomponent tag let you select the port to use in a WSDL that contains more than o...

Страница 27: ...ata Source JNDI After it is defined you can specify the data source name in the datasource attribute of SQL tags to access the J2EE data source Datasources found in this way cannot specify additional...

Страница 28: ...47 Jintegra upgraded from COM 2 1 to 2 2 Axis 1 2 RC2 plus fixes Enhanced string and data encoding and decoding Use the following new functions for encoding and decoding text and data BinaryEncode Con...

Страница 29: ...bjects using the CreateObject function also turns off access using the cfobject tag User defined functions You can now call user defined functions using the same name as the following obsolete advance...

Страница 30: ...t to use the Enterprise Manager you must uninstall JRun before installing ColdFusion MX 7 Alternatively you can continue defining server instances using the JMC For more information on this changes se...

Страница 31: ...For more information see Configuring and Administering ColdFusion MX The Web Server Configuration Tool creates the following additional properties ProxyRetryInterval The number of seconds to wait bef...

Страница 32: ...ipt 2 0 and uses a component ServerSide ActionScript is deprecated in ColdFusion MX 7 During a multiserver configuration installation the default JRun server is not installed which means that the jrun...

Страница 33: ...e following tables list tags attributes and values that have changed since ColdFusion 5 and indicate the specific release in which the change was made Each change might affect code that was written fo...

Страница 34: ...oldFusion MX 7 All ColdFusion MX cfcache cacheDirectory timespan attributes ColdFusion MX Changes The action cache attribute caches on both the server and client and the cache and optimal values are e...

Страница 35: ...e attribute gets the current values every time an exception is thrown and ColdFusion MX ignores any cfset assignment to a cfcatch member To remedy this construct a new message or variable to make exte...

Страница 36: ...ext ColdFusion MX displays the header as true ColdFusion 5 displays the header as TRUE cfcollection categories attribute ColdFusion MX 7 New values of the language attribute categoryList value of acti...

Страница 37: ...ry results but only subdirectories like on UNIX If your application has code to skip these rows for example startrow 3 you must change it Windows This tag no longer supports sort temporary and it only...

Страница 38: ...ributes onReset event Changes ColdFusion MX ColdFusion MX only uses the cfinput tag s checked attribute if the corresponding form field value is undefined ColdFusion 5 used the checked attribute if th...

Страница 39: ...tribute ColdFusion MX 7 Change ColdFusion MX ColdFusion MX still allows the proxyBypass attribute but it has no affect cffunction description attribute xml value for returnType attribute ColdFusion MX...

Страница 40: ...ser proxyPassword attributes charset firstrowasheaders attributes The cfhttp response headers in ColdFusion MX differ from those in ColdFusion 5 as follows Mixed case returned by the server without ch...

Страница 41: ...ight and width attributes all except checkbox and radio ColdFusion MX 7 bind attribute text and password label attribute all but radio button image reset and submit mask attribute text only validateAt...

Страница 42: ...e LDAP server does not support server side sorting cfldap throws an error The sort order depends on the LDAP server for example iPlanet Directory Server 5 0 Novell 6 0 server Oracle Internet Directory...

Страница 43: ...validCharInURLExceptio n if the CR LF characters are in the query string in ASCII or hexadecimal Changes ColdFusion MX The cflocation tag now appends cfid and cftoken along with JSessionId if enabled...

Страница 44: ...butes ColdFusion MX 7 type attribute ColdFusion MX 6 1 cfmailpart All ColdFusion MX 6 1 cfNTauthenticate All ColdFusion MX 7 cfobject All ColdFusion MX cfobjectcache All ColdFusion MX cfparam min max...

Страница 45: ...ref cursors into a result set Note you cannot use this method with the Oracle ThinClient JDBC drivers ColdFusion MX ignores the dbvarname attribute for all drivers ColdFusion 5 used it for Sybase Orac...

Страница 46: ...lect FROM from popQuery ColdFusion MX measures the timeout value in seconds instead of milliseconds as in ColdFusion 5 You must convert each timeout value from milliseconds to seconds cfregistry Chang...

Страница 47: ...MX 7 cfsearch category categoryTree status suggestions contextPassages contextBytes contextHighlightBegin contextHighlightEnd previousCriteria attributes ColdFusion MX 7 natural internet and internet...

Страница 48: ...der attribute changed ColdFusion MX If you use the cftable header attribute without any text ColdFusion MX displays the header as true ColdFusion 5 displays the header as TRUE cftextarea All ColdFusio...

Страница 49: ...attributes attribute ColdFusion MX cfform passthrough attribute ColdFusion MX 7 enableCAB attribute ColdFusion MX cfftp agentname attribute ColdFusion MX cfgraph All ColdFusion MX cfgraphdata All Cold...

Страница 50: ...s ColdFusion MX cftextinput All ColdFusion MX 7 cfupdate connectString dbName dbServer dbtype provider providerDSN attributes ColdFusion MX Tag Attribute or value Obsolete as of this ColdFusion releas...

Страница 51: ...ColdFusion MX cfsetting catchExceptionsByPattern attribute ColdFusion MX Function Parameter value or change Added in this ColdFusion release Comment ArrayAvg ArrayMin ArrayMax ArraySum Change ColdFus...

Страница 52: ...returns the same value as the ww weeks datepart option DatePart L key of datepart parameter ColdFusion MX 6 1 Decrypt algorithm and encoding parameters ColdFusion MX 7 DeleteClientVariable Change Col...

Страница 53: ...uestHeader All ColdFusion MX 7 GetSOAPResponse All ColdFusion MX 7 GetSOAPResponseHeader All ColdFusion MX 7 GetTempDirectory Change ColdFusion MX Windows This function returns the temporary directory...

Страница 54: ...oldFusion MX When calculating a length a string processing function processes an ASCII 0 NUL character and continues to process subsequent characters of the string if any In ColdFusion 5 these functio...

Страница 55: ...on MX This function supports full date and full datetime as parameters which include the name of the day LSParseDateTime Change ColdFusion MX For English US locales the following date mask format is o...

Страница 56: ...classes such as upper lower alpha and so on These functions do not allow the backslash character in a regular expression even if it is inside a character class You must escape it by prefixing an addit...

Страница 57: ...ixes alternate between escaping the code and not For backrefs they always escape ReleaseComObject All ColdFusion MX 6 1 SendGatewayMessage All ColdFusion MX 7 SetEncoding All ColdFusion MX StructKeyLi...

Страница 58: ...rm All ColdFusion MX XmlTransform parameters parameter ColdFusion MX 7 XmlValidate All ColdFusion MX 7 Function Parameter or value Deprecated as of this ColdFusion release GetMetricData cachepops para...

Страница 59: ...They do not work in releases later than ColdFusion 5 As of ColdFusion MX 7 you can create user defined functions that have the following names Function Parameter or value Obsolete as of this ColdFusi...

Страница 60: ...60 Chapter 3 Tag and Function Changes...

Отзывы: