User Guide

Table Of Contents
About ColdFusion, Java, and J2EE 919
ColdFusion pages can also access servlets by using the cfhttp tag, use the servlet URL in a form
tag, or access an SHTML page that uses a
servlet tag.
Note: The cfservlet tag, which provides access to servlets on JRun servers, is deprecated for
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 tag to access Java objects.
ColdFusion MX searches for the objects in the following order:
1.
The ColdFusion Java Dynamic Class Load directories:
Java archive (.jar) files in web_root/WEB-INF/lib
Class (.class) files in web_root/WEB-INF/classes
ColdFusion reloads classes from these directories, as described in the next section, About class
loading”.
2.
The classpath specified on the JVM and Java Settings page in the ColdFusion MX
Administrator.
3.
The default JVM classpath.
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 time
stamp 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, put 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 MX.
Note: Because you put tag libraries in the web_root/WEB-INF/lib directory, ColdFusion
automatically reloads these libraries if necessary when you import the library.