Railo 4.2 Reference
Choose a tag:

Tag <CFCOMPONENT>

Creates and defines a component object; encloses functionality that you build in CFML and enclose within cffunction tags. This tag contains one or more cffunction tags that define methods. Code within the body of this tag, other than cffunction tags, is executed when the component is instantiated.

Body

This tag must have a body.

Example

	<cfcomponent
		[alias="string"]
		[bindingname="string"]
		[displayname="string"]
		[extends="string"]
		[hint="string"]
		[mappedsuperclass="boolean"]
		[namespace="string"]
		[output="boolean"]
		[persistent="boolean"]
		[porttypename="string"]
		[serviceaddress="string"]
		[serviceportname="string"]
		[style="string"]
		[synchronized="boolean"]
		[wsdlfile="string"] ... >

	</cfcomponent>
This tag is also supported within cfscript
	<cfscript>
		component
		[alias="string"]
		[bindingname="string"]
		[displayname="string"]
		[extends="string"]
		[hint="string"]
		[mappedsuperclass="boolean"]
		[namespace="string"]
		[output="boolean"]
		[persistent="boolean"]
		[porttypename="string"]
		[serviceaddress="string"]
		[serviceportname="string"]
		[style="string"]
		[synchronized="boolean"]
		[wsdlfile="string"] ...  {

	}
	</cfscript>

Attributes

This tag has a fixed definition of attributes (see below). In addition it allowes to use any additional attribute.
Name Type Required Description
alias string No  
bindingname string No Specifies the name of the binding element in the WSDL.
This attribute applies only when style="document". 
displayname string No A string to be displayed when using introspection to show
information about the CFC. The information appears on the
heading, following the component name.
If the style attribute is set to document, the displayname
attribute is used as the name of the service element in the WSDL. 
extends string No Name of parent component from which to inherit methods and properties. 
hint string No Text that displays when you use introspection to show information about the CFC. The hint attribute value appears below the component name heading. Use this attribute to describe the purpose of the component. 
mappedsuperclass boolean No  
namespace string No Specifies the namespace used in the WSDL when
using the CFC as a document-literal style web service.
If you don't specify this attribute, Railo
derives the namespace from the CFC class name.
This attribute applies only when style="document". 
output boolean No - true: permits component method output
- false: suppresses component method output 
persistent boolean No Specifies CFC is persistent or not 
porttypename string No Specifies the name of the porttype element in the WSDL.
This attribute applies only when style="document". 
serviceaddress string No Specifies the SOAP URL of the web service. If you don't specify this attribute, Railo uses the URL of the CFC in the WSDL service description.
Use this attribute to specify the protocol, for example, by specifying a URL that starts with https://. This attribute applies only for web services. 
serviceportname string No Specifies the name of the port element in the WSDL.
This attribute applies only when style="document". 
style string No Specifies whether a CFC used for web services uses RPC-encoded style or document-literal style 
synchronized boolean No If set to true all calls to an instance of a component are synchronized. This setting allows a method to be executed only by one single thread at a time. 
wsdlfile string No A properly formatted WSDL file to be used instead of
WSDL generated by Railo.
This attribute applies only when style="document".