this function is deprecated, do the following instead.
- For Java use the function "JavaNew"
- For Webservices use the function "WebserviceNew"
- For Components do instead "new ComponentName()" or the function "loadComponent"
- There is no replacement for "com"
The CreateObject function takes different arguments depending on the value of the first argument:
CreateObject('com', class, context, serverName)
CreateObject('component', component-name)
CreateObject('java', class)
CreateObject('webservice', urltowsdl, [, portname])
Lucee Function Reference
Function CREATEOBJECT
Example
createobject(string type,[string classname,[object context,[object delimiterOrVersion]]]):any
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Description |
---|---|---|---|
type | string | Yes |
one of the following: |
classname | string | No |
the usage of this argument depend on type defined with argument "type": |
context | object | No |
the usage of this argument depend on type defined with argument "type": this can be a list of multiple paths (directories containing class files or jar files) as string list or array or a name of an OSGi bundle (Lucee can download OSGi bundles automatically if necessary) |
delimiterOrVersion | object | No |
the usage of this argument depend on type defined with argument "type": |