Lucee Recipes

Detailed Recipes showing you how to take advantage of the wide range of features in Lucee

Adding Caches via Application.cfc How to add per-application caches via Application.cfc in Lucee.
AI Integration for Documentation (Experimental) Guide to configuring AI for use in Lucee's Documentation tab, leveraging retrieval-augmented generation (RAG) and enhanced search functionality.
Basic Date Learn how to output the current date in Lucee.
Breaking Changes Between Lucee 6.0 and 6.1 A guide to breaking changes introduced in Lucee between version 6.0 and 6.1
Breaking Changes Between Lucee 6.1 and 6.2 A guide to breaking changes introduced in Lucee between version 6.1 and 6.2
Cache a query for the current request Cache a Query for the current request in Lucee.
Check for changes Automatically check for changes in your configuration file with Lucee.
Checksum This document explains how to use a checksum in Lucee.
Configuration - CFConfig.json Best practices for configuring Lucee in various environments.
Configuration Lucee 5 Best practices for configuring Lucee 5 environments.
Configure Lucee within your Application How to configure Lucee within your application using Administrator.cfc and cfadmin tag.
Convert a CFML Function/Component to use in Java Learn how to convert user-defined functions or components in Lucee to use them in Java. This guide demonstrates how to define components to implement Java interfaces, pass components to Java methods, explicitly define interfaces, and use the onMissingMethod feature. It also shows how to convert user-defined functions to Java lambdas.
Creating and deploying Lucee Archives (.lar files) This document explains how to deploy an Application on a live server without using a single CFML file.
Custom Event Gateways Here you will find a short introduction into writing your own Event Gateway type.
Data Types in Lucee This document explains types in Lucee. Lucee is still an untyped language. Types are only a check put on top of the language.
Datasources How to define a Datasource in Lucee.
Define a mapping All about the different mappings in Lucee and how to use them.
Docker Guide on using and running Lucee with Docker
Encryption/Decryption with RSA public and private keys This document explains about Encryption/Decryption with public and private keys with simple examples.
Environment Variables / System Properties for Lucee This document gives you an overview over all Environment Variables an System Properties you can set for Lucee.
Event Gateways Overview of how Event Gateways work in Lucee.
Event Gateways in Lucee EG's are another way how to communicate with your Lucee server and are kind of a service running on Lucee, reacting on certain events.
Event Handling in Application.cfc An overview of event handling functions in Application.cfc for Lucee.
Event Handling in Application.cfc An overview of event handling functions in Application.cfc for Lucee.
Exception - Cause Lucee 6.1 improves its support for exception causes, providing better debugging and error handling capabilities.
Exception Output How to catch and display exceptions.
Extension Installation A comprehensive guide on how to install extensions in 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.
File system - Mappings Overview of different mapping types in the file system.
Function Listeners This document explains how to use a Function Listeners in Lucee.
Get Datasource Drivers Directly from Maven Learn how to get datasource drivers directly from Maven.
Global Proxy Learn how to define a global proxy in Lucee. This guide demonstrates how to set up a global proxy in the Application.cfc file, limit the proxy to specific hosts, and exclude specific hosts from using the proxy.
Hidden Gems This document explains how to declare variables, function calls with dot and bracket notation, and passing arguments via URL/form scopes as an array.
Import Guide on using import to import components, Java classes, and custom tags in Lucee
Inline Components Learn how to create and use inline components in Lucee. This guide demonstrates how to define components directly within your CFML code, making it easier to create and use components without needing a separate .cfc file. Examples include creating an inline component and using it similarly to closures.
Interacting with Java Libraries Guide on using Java libraries in Lucee 6.2 with Maven and import
Java - Explicit Casting of a Component to a Specific Interface Shows how to explicitly cast a component to a specific interface.
Java in Functions and Closures Learn how to write CFML code directly in a function or a closure with Java types in Lucee. This guide demonstrates how to define functions and components with Java types, and how to use Java lambda functions within Lucee. You will see examples of how to handle exceptions, define return types, and implement functional Java interfaces (Lambdas) seamlessly.
Java Settings in Application.cfc Guide on configuring Java settings in Lucee using Application.cfc
Language Server Protocol (LSP) for Lucee This document explains how to configure and use the Language Server Protocol implementation for Lucee CFML/CFScript.
Lazy Queries How to use lazy queries
List existing Cache Connections List existing Cache Connections available in Lucee.
Logging How to configure and customize logging
Logging CFHTTP Calls Learn how Lucee logs all CFHTTP calls and how to manage these logs. This guide explains the default behavior, log file locations, and changes in logging from earlier Lucee versions.
Loop Labels Lucee supports labels for all loop tags and statements, allowing you to control the flow of nested loops more precisely.
Looping Through File This document explains how to handle big files in Lucee in a better way.
Mail Listeners Learn how to define mail listeners in Lucee. This guide demonstrates how to set up global mail listeners in the Application.cfc file to listen to or manipulate every mail executed. Examples include defining listeners directly in Application.cfc and using a component as a mail listener.
Mathematical Precision Learn about the switch from double to BigDecimal in Lucee 6 for more precise mathematical operations. This guide provides information on how to change the default behavior if needed.
Monitoring - Enable for your session Shows you a way to enable Monitoring for your session
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.
New Operator in Lucee This document provides a guide on using the new operator in Lucee for creating instances of CFML components and Java classes.
Null Support This document explains how to set null support in the Lucee server admin, assigning `null` value for a variable and how to use `null` and `nullvalue`.
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.
Overwriting and adding Built-in Functions and Tags Learn how to overwrite or add built-in functions and tags in Lucee to customize behavior or backport fixes.
PDF Engine - CFDOCUMENT using Flying Saucer The new CFDOCUMENT PDF engine, Flying Saucer in Lucee 5.3
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.
Query Async Learn how to execute queries asynchronously in Lucee. This guide demonstrates how to set up asynchronous query execution using a simple flag. Examples include defining async execution for queries and using local listeners to handle exceptions. Additionally, function listeners introduced in Lucee 6.1 can be used for this purpose.
Query Handling In Lucee How to do SQL Queries with Lucee.
Query Indexes Learn how to set and use indexes for query results in Lucee. This guide demonstrates how to define a query with an index and access parts of the query using the index.
Query Listeners Learn how to define query listeners in Lucee. This guide demonstrates how to set up global query listeners in the Application.cfc file to listen to or manipulate every query executed. Examples include defining listeners directly in Application.cfc and using a component as a query listener.
Query of Queries (QoQ) Query of queries (QoQ) is a technique for re-querying an existing (in memory) query without another trip to the database.
Query of Queries sometimes it rocks, sometimes it sucks This document explains why Query of Queries (QoQ) may or may not be the best approach for your use case.
Query return type This document explains the different return types for a query with some examples.
Read XML with a listener Model (SAX) Lucee not only allows you to convert an XML file to an object tree (DOM) but also supports an event-driven model (SAX).
Regions in Lucee Guide on configuring and interacting with specific S3 regions in Lucee using the S3 extension.
Request Timeout Learn how to use request timeout correctly with Lucee.
Retry This document explains how to use retry functionality with some simple examples.
Script Templates (.cfs) Learn about script templates in Lucee. This guide explains how Lucee supports templates with the `.cfs` extension, allowing you to write direct script code without the need for the `<cfscript>` tag.
Sending Emails How to send an email using Lucee wth help of the tag cfmail.
Single Mode vs Multi Mode Understanding the differences between single mode and multi mode in Lucee.
Startup Listeners: Server.cfc and Web.cfc Lucee supports two types of Startup Listeners: Server.cfc and Web.cfc.
Static scope in components Static scope in components is needed to create an instance of cfc and call its method.
Sub Components Learn how to create and use sub components in Lucee. This guide demonstrates how to define additional components within a .cfc file, making it easier to organize related components. Examples include creating a main component with sub components, and how to address/load these sub components.
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.
Tag Syntax How to use tags in script
Thread Tasks How to use Thread Tasks
Timeout Learn how to use the <cftimeout> tag in Lucee. This guide demonstrates how to define a timeout specific to a code block, handle timeouts with a listener, and handle errors within the timeout block.
Update current Application Context How to update your Application settings, after they have been defined in Application.cfc.
Using Maven directly via CFML How to use Maven in Lucee
Using S3 directly for source code Using S3 directly for source code
Using Threads in Lucee How to use threads in Lucee
Virtual File Systems Lucee supports the following virtual file systems: ram, file, s3, http, https, zip, and tar.
WebSocket Extension How to install, congigure and create WebSockets
XML Fast And Easy, using SAX - Listener Functions This document explains how to use XML parsing in Lucee.