Adobe COLDFUSION 9 Manual page 236

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Building Blocks of ColdFusion Applications
Debugging in a Java IDE
You can use a Java IDE to debug your Java CFX tags. As a result, you can develop your Java CFX tag and debug it in a
single environment.
Start your IDE.
1
In the project properties (or the project setting of your IDE), make sure your CFX class is in the web_root\WEB-
2
INF\classes directory or in the system classpath.
3
Make sure the libraries cf_root/wwwroot/WEB-INF/lib/cfx.jar (cf_webapp_root/WEB-INF/lib/cfx.jar in the J2EE
configuration) and cf_root/runtime/lib/jrun.jar (server configuration only) are included in your classpath.
In your project settings, set your main class to jrunx.kernel.JRun and application parameters to
4
Debug your application by setting breakpoints, single stepping, displaying variables, or by performing other
5
debugging actions.
Using the debugging classes
To develop and debug Java CFX tags in isolation from the ColdFusion, you use three special debugging classes that are
included in the
com.allaire.cfx
your CFX tag within the context of the interactive debugger of a Java development environment. The three debugging
classes are the following:
: An implementation of the
DebugRequest
attributes, settings, and a query.
: An implementation of the
DebugResponse
has completed.
: An implementation of the
DebugQuery
a data set.
Implement a main method
Create a
method for your Java CFX class.
1
main
2
Within the
method, initialize a
main
attributes and data for your test.
Create an instance of your Java CFX tag and call its
3
objects.
DebugResponse
Call the
4
DebugResponse.printResults
variables set, queries created, and so on.
After you implement a
main
single-step debugger. Specify your Java CFX class as the
debugging.
Example:debugging classes
The following example demonstrates how to use the debugging classes:
package. These classes lets you simulate a call to the
interface that lets you initialize the request with custom
Request
Response
interface that lets you initialize a query with a name, columns, and
Query
and
DebugRequest
processRequest
method to output the results of the request, including content generated,
method as described previously, you can debug your Java CFX tag using an interactive,
main
Last updated 8/5/2010
interface that lets you print the results of a request once it
, and a
DebugResponse
DebugQuery
method, passing in the
class, set breakpoints as appropriate, and begin
.
-startdefault
method of
processRequest
. Use the appropriate
and
DebugRequest
231

Advertisement

Table of Contents
loading

Table of Contents