Lucee Server related Tags, Functions and Guides
Functions
- ApplicationPathCacheClear()
flush the application.[cfc|cfm] path cache
- BundleInfo()
if the given object is loaded by an OSGi bundle, this function is returning information about that bundle
- ComponentCacheClear()
flush the component path cache
- ConfigImport()
Imports configuration using the "CFConfig.json" format.
- configTranslate()
translate an old Lucee XML configuration to the new CFConfig.json configuration
- CtCacheClear()
flush the custom tag path cache
- CtCacheList()
list elements in the custom tag path cache
- DbPoolClear()
clears all existing datasource connection
- EC2describeInstances()
This function interfaces with the EC2 service to retrieve detailed information about specified EC2 instances. It supports custom filtering, specific instance IDs, regional targeting, and legacy mode handling.
- ExtensionExists()
Checks if a certain extension exists or not.
- ExtensionList()
Checks if a certain extension exists or not.
- GetBuiltInFunction()
return a build in function as an object, matching the given name, throws an exception when the function does not exist.
- GetClassPath()
returns an array containing the Java classpath of the current environment.
- GetContextInfo()
Returns information about the current context.
- GetContextRoot()
Returns path to the J2EE server context root for the current request.
- GetCPUUsage()
returns the CPU usage for a defined time range (default: 1000ms).
- GetFreeSpace()
Returns the number of unallocated bytes in the partition named by this abstract path name.
- GetFunctionCalledName()
Returns the name of variable used to call the current function
- GetFunctionData()
Returns information about a built in function (BIF)
- GetFunctionKeywords()
returns all keywords defined with all functions
- GetFunctionList()
Returns all the currently registered functions
- GetLocalHostIP()
Returns the localhost IP address, which is 127.0.0.1 for IPv4 and ::1 for IPv6 addresses.
- GetMemoryUsage()
Returns detailed information to the memory usage of the container.
- GetMetricData()
Gets server performance metrics.
- GetPageContext()
Gets the current PageContext object that provides access to page attributes and configuration, request and response objects.
- GetSystemFreeMemory()
The amount of memory that is currently free, in bytes.
- GetSystemPropOrEnvVar()
Return the list of supported system properties or env vars Lucee supports.
- GetSystemTotalMemory()
The amount of memory that is available to the operating system, in bytes.
- GetTagData()
Returns Information about a Tag as Struct
- GetTagList()
Returns a struct containing all the Tags supported by Lucee.
- GetTotalSpace()
Returns the size of the partition named by this abstract pathname.
- GetVFSMetaData()
Returns metadata about the Virtual File system (VFS)
- InspectTemplates()
Flag all the cfml code (cfm, cfcs) in the cache of compiled code (aka the Page Pool) to be checked once for any changes.
- internalRequest()
Makes a request to the CFML Engine internally.
- IsInThread()
Determines whether the executing code is inside a cfthread or not.
- LogAllThreads()
Creates detailed thread stack trace logs in JSONL format for performance analysis and debugging. This function captures stack traces from all running threads at specified intervals for a given duration. It executes asynchronously, returning immediately after starting the logging process, making it ideal for analyzing specific code segments by initiating logging just before the target code execution
- MavenInfo()
Retrieves information about a Maven artifact and its dependencies. This function allows you to query details about a specific Maven artifact by providing its coordinates (groupId, artifactId, and optionally version). It returns a query containing information about the artifact itself and all of its dependencies based on the specified scope
- PagePoolClear()
Clear out all the cfml code (cfm, cfcs) in the cache of compiled code (aka the Page Pool)
- PagePoolList()
Lists all the cfml code (cfm, cfcs) in the cache of compiled code (aka the Page Pool)
- RestInitApplication()
Registers the directory path with the service mapping provided.
- SecretProviderGet()
Returns a reference to a secret value stored in a configured Secret Provider. The function doesn't immediately return the actual value, but rather a value object that can be handled by Lucee like a simple value. This reference is automatically resolved to its actual value when: - It's converted to a real simple value (string, boolean, number, date) - It's used in operations requiring a simple value When used, the function automatically validates that the secret exists and throws an exception if not found
- SSLCertificateInstall()
install certificates of a specific host
- SSLCertificateList()
Returns a list of SSL certificates. If a host is specified, it lists the certificates available for that specific host. If no host is specified, it lists all certificates stored in the KeyStore.
- SystemCacheClear()
clears all caches or the specified cache
Tags
- <cflock>
Provides two types of locks to ensure the integrity of shared data: Exclusive lock and Read-only lock.
- <cfobjectcache>
Flushes an object cache or returns the current size.
- <cfprocessingdirective>
Sets compiler directives that affect the entire template. Unlike most CFML tags, cfprocessingdirective is processed at compile time and must be placed at the root level of your template.
- <cfregistry>
Reads, writes, and deletes keys and values in the system registry. The cfregistry tag is supported on all platforms, including Linux, Solaris, and HP-UX.
- <cfsetting>
Controls various aspects of page processing, such as the output of HTML code in pages. One benefit of this option is managing whitespace that can occur in output pages served by CFML.
Guides
- Automatic monitoring and applying CFConfig changes
Automatically check for changes in your configuration file with Lucee.
- CFAdmin documentation
Since several people asked us to document the CFAdmin tag, we are publishing it here already so that you can have a look at all the actions and attributes as well as the examples available. General information The tag is used for all changes one wants to do in the Lucee configuration. Depending on what value for the attribute type you pass (web|server) either the local web configuration is changed or the global server one
- Component Mappings
How to define and use component mappings in Lucee.
- Configuration - CFConfig.json
Best practices for configuring Lucee in various environments.
- Configuration Lucee 5
Best practices for configuring Lucee 5 environments.
- Configuration: Lucee web.xml
How to configure Tomcat's web.xml for Lucee
- Configure Lucee within your Application
How to configure Lucee within your application using Administrator.cfc and cfadmin tag.
- Configuring Regional Settings
Lucee by default, uses the JVM's default timezone, which comes from the operating system.
- Console logging using SystemOutput
Use the console for debugging
- Datasources
How to define a Datasource in Lucee.
- Define a mapping
All about the different mappings in Lucee and how to use them.
- Deploying Lucee
Lucee Security Best Practices Lockdown Guide Locking Down Tomcat The deploy folder There is a
/deploy
folder under the/lucee-server/
folder which can be used to customize Lucee . The/deploy
folder is polled on startup and every 60 seconds by Lucee's Controller thread. It looks for ` - Directory Placeholders
Placeholders are uses to reference specific Lucee directories
- Docker
Guide on using and running Lucee with Docker
- Downloading and Installing Lucee
Download and Install Lucee Server Lucee can be installed and run almost everywhere that is capable of running a [supported Java Version](/guides/installing-lucee/download-and-install.html supportedJavaVersions). You can even run Lucee on a small RaspberryPI. Because of its great flexibility, Lucee Server comes in different flavors to match your needs (Lucee Installer, Docker, Lucee Express, CommandBox, or manually deploying Lucee
- Environment Variables / System Properties for Lucee
This document gives you an overview over all Environment Variables and System Properties supported by Lucee.
- Externalize strings
Externalize strings from generated class files to separate files. This method is used to reduce the memory of the static contents for templates.
- File Extensions
Learn about the different file extensions supported by Lucee, including .cfm, .cfc, .cfml, and .cfs. This guide provides examples for each type of file.
- Locking Down Lucee
Security best practises to lock down your Lucee server
- Locking Down Tomcat
Restricting Access to Tomcat's Web Server
- Logging
How to configure and customize logging
- Lucee Archives (.lar files) - Creating and deploying
This document explains how to deploy an Application on a live server without using a single CFML file.
- Monitoring/Debugging
Learn about the changes in Lucee 6.1 regarding Monitoring and Debugging. Understand the old and new behavior, and how to configure the settings in Lucee Admin and Application.cfc.
- onBuild Function in Server.cfc
The onBuild function in Server.cfc is used for tasks during the build phase in Lucee, particularly useful in Docker environments.
- Precompiled
How to pre-compile code for a production server while the source code is deployed to avoid compilation on the production server for security reasons.
- Recommended Settings
A guide on how to configure your Lucee Server for the best performance and highest security.
- Request Timeout
Learn how to use request timeout correctly with Lucee.
- Scheduled Tasks - efficiently updating in a single operation
How to update scheduled tasks in a single operation
- Secret Management
Managing Secrets in Lucee applications
- Securing /WEB-INF/ by moving it outside of the web root
By default, Lucee places its web-context configuration and data files in a folder named WEB-INF within the web root of each website.
- Session Handling in Lucee
Comprehensive guide on session handling and configuration in Lucee, including session types, storage options, and security considerations.
- Setting System Properties and Environment Variables
How to set and use Environment Variables or System Properties to configure specific Lucee Server settings.
- Single Mode vs Multi Mode
Understanding the differences between single mode and multi mode in Lucee.
- Starting and Stopping Lucee on Linux
In a Linux environment, Lucee can be controlled by using the provided lucee_ctl script, which is configured by the installer according to your choices. During a standard install, it is possible for two (2) copies of this file to be created
- Starting and Stopping Lucee on Windows
If you run the Lucee installer, it will create a Windows Service and also enable optional control panels based on Apache Tomcat which is implemented by the Lucee installer. There are then a couple different methods to start or stop the Lucee/Tomcat service on a Windows machine. We'll go over these items here. While the Tomcat implementation underlying Lucee also offers other ways to start and stop Lucee from the command line (via the lucee\tomcat\bin folder), this documentation is not referring to that
- Startup Listeners: Server.cfc and Web.cfc
Lucee supports two types of Startup Listeners: Server.cfc and Web.cfc.
- Supercharge your website
This document explains how you can improve the performance of your website in a very short time with Lucee.
- SystemOutput, writing to the console
This document explains the systemoutput function with some simple examples.
- Template Performance / Caching
Performance / Caching The settings you make here determine how Lucee deals with changed CFM files. Normally Lucee will compile any modified file into a new Java class file. While this is very fast (depending on the complexity and size of the file to this might take around 10ms), however, each , , CFC invocation, CustomTags call, etc
- Troubleshooting Lucee Server problems
A guide to diagnosing problems with Lucee
- Updating Tomcat Memory Settings
Lucee 6.2 The Lucee Installer since Lucee 6.2, doesn't set memory default, which the allows the JVM to automatically size the memory, the default is usually 50% of available memory. LDEV-5332 Windows As your site grows and your memory needs increase, you will inevitably need to adjust the memory settings for the Lucee Server JVM from it's default setting of 256MB of RAM
- Using S3 directly for source code
Using S3 directly for source code
- Virtual File Systems
Lucee supports the following virtual file systems: ram, file, s3, http, https, zip, and tar.