Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1132

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Standard JSP tags: Such as jsp:plugin, unless your J2EE server provides access to these tags in a JAR file. Instead, you
use ColdFusion tags and the PageContext object.
About ColdFusion and servlets
Some Java servlets are not exposed as JSP pages; instead they are Java programs. You can incorporate JSP servlets in
your ColdFusion application. For example, your enterprise could have an existing servlet that performs some business
logic. To use a servlet, the ColdFusion page specifies the servlet by using the ColdFusion GetPageContext function.
When you access the servlet with the
and Session scopes with the servlet, so you can use these scopes for shared data.
ColdFusion pages can also access servlets by using the
SHTML page that uses a
servlet
Note: The cfservlet tag, which provides access to servlets on JRun servers, is deprecated since ColdFusion MX.
About ColdFusion and Java objects
Java objects include the following:
• Standard Java classes and methods that make up the J2EE API
• Custom-written Java objects, including the following:
• Custom classes, including JavaBeans
• Enterprise JavaBeans
ColdFusion pages use the
cfobject
ColdFusion searches for the objects in the following order:
The ColdFusion Java Dynamic Class Load directories:
1
2
Java archive (.jar) files in web_root/WEB-INF/lib
3
Class (.class) files in web_root/WEB-INF/classes
ColdFusion reloads classes from these directories, as described in the next section, "About class loading."
The classpath specified on the JVM and Java Settings page in the ColdFusion Administrator.
1
The default JVM classpath.
2
About class loading
ColdFusion dynamically loads classes that are either .class files in the web_root/WEB-INF/classes directory or in JAR
files in the web_root/WEB-INF/lib directory. ColdFusion checks the timestamp on the file when it creates an object
that is defined in either directory, even when the class is already in memory. If the file that contains the class is newer
than the class in memory, ColdFusion loads the class from that directory.
To use this feature, make sure that the Java implementation classes that you modify are not in the general JVM
classpath.
To disable automatic class loading of your classes, place the classes in the JVM classpath. Classes located on the JVM
classpath are loaded once per server lifetime. To reload these classes, stop and restart ColdFusion.
About GetPageContext and the PageContext object
Because ColdFusion pages are J2EE servlet pages, all ColdFusion pages have an underlying Java PageContext object.
CFML includes the GetPageContext function that you can then use in your ColdFusion page.
function, the ColdFusion page shares the Request, Application,
GetPageContext
cfservlet
tag.
tag to access Java objects.
Last updated 1/20/2012
tag, use the servlet URL in a
1127
tag, or access an
form

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents