Whatever message this page gives is out now! Go check it out!
import path.to.SomeComponent
component {
function f() {
myObject = new SomeComponent()
}
}<cfimport
path = "the CFC namespace to import"
prefix = "custom"
taglib = "tag library location">Attribute | Req/Opt | Default | Description |
taglib | Required | Tag library URI. The path must be relative to the web root (and start with /), the current page location, or a directory specified in the Administrator ColdFusion mappings page.
| |
prefix | Required | Prefix by which to access the imported custom CFML tags JSP tags. If you import a CFML custom tag directory and specify an empty value, "", for this attribute, you can call the custom tags without using a prefix. Specify and use a prefix for a JSP tag library. | |
| path | Optional | Use this attribute to import a CFC namespace. |
<cfimport
prefix="mytags"
taglib="myCustomTags">
<cfimport
path="cfc.conf.abc">
<cfimport
path="cfc.system.*"><cfimport
prefix="mytags"
taglib="/WEB-INF/lib/myjsptags.jar"><cfoutput>
<mytags:helloTag message="#mymessage#" />
<cfoutput><h3>cfimport example</h3>
<p>This example uses the random JSP tag library that is available from the
Jakarta Taglibs project, at http://jakarta.apache.org/taglibs/</p>
<cfimport taglib="/WEB-INF/lib/taglibs-random.jar" prefix="randomnum">
<randomnum:number id="randPass" range="000000-999999" algorithm="SHA1PRNG" provider="SUN"/>
<cfset myPassword = randPass.random>
<cfoutput>
Your password is #myPassword#<br>
</cfoutput><cfset a = new abc()>