From 9327c280dc31b596f116163757f42e9c83084d83 Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Wed, 26 Jun 2024 20:32:57 +0200 Subject: [PATCH 1/2] cleanup spelling, markdown, yaml, update github actions (#1440) --- .github/workflows/index-recipes.yml | 44 +++--- .github/workflows/lint.yml | 10 +- .github/workflows/main.yml | 14 +- .github/workflows/test.yml | 8 +- .../02.tags/queryparam/_attributes/list.md | 2 +- docs/recipes/README.md | 4 +- docs/recipes/application-context-update.md | 3 +- docs/recipes/archives-creating-and-deploy.md | 11 +- docs/recipes/basic-date.md | 3 +- docs/recipes/cached-within-request.md | 3 +- .../caches-defined-in-application-cfc.md | 16 ++- docs/recipes/check-for-changes.md | 3 +- docs/recipes/checksum.md | 9 +- .../configuration-administrator-cfc.md | 3 +- docs/recipes/convert-a-cfml-func-to-java.md | 5 +- docs/recipes/datasource-how-to-define-them.md | 3 +- docs/recipes/docker.md | 3 +- docs/recipes/encryption_decryption.md | 11 +- ...environment-variables-system-properties.md | 14 +- docs/recipes/event-gateway-create.md | 23 +-- docs/recipes/event-gateway-in-app-cfc.md | 11 +- docs/recipes/event-gateways-how-they-work.md | 17 +-- docs/recipes/event-gateways.md | 25 ++-- docs/recipes/event-handling-in-app-cfc.md | 5 +- docs/recipes/exception-cause.md | 3 +- docs/recipes/exception-output.md | 5 +- docs/recipes/externalizing-strings.md | 3 +- docs/recipes/file-extensions.md | 3 +- docs/recipes/filesystem-mapping.md | 3 +- docs/recipes/function-listeners.md | 19 ++- docs/recipes/function-systemoutput.md | 18 +-- docs/recipes/get-dbdriver-from-maven.md | 9 +- docs/recipes/global-proxy.md | 3 +- docs/recipes/hidden-gems.md | 3 +- docs/recipes/index.json | 136 +++++++++--------- docs/recipes/inline-components.md | 9 +- .../recipes/java-in-functions-and-closures.md | 5 +- docs/recipes/lazy-queries.md | 7 +- docs/recipes/list-existing-cache-conn.md | 3 +- docs/recipes/loop-labels.md | 2 + docs/recipes/loop-through-files.md | 9 +- docs/recipes/mail-how-to-send-a-mail.md | 1 + docs/recipes/mail-listener.md | 3 +- .../mappings-how-to-define-a-reg-mapping.md | 3 +- docs/recipes/mathematical-precision.md | 3 +- docs/recipes/monitoring-debugging.md | 32 ++++- .../monitoring-enable-for-your-session.md | 4 +- docs/recipes/null-support.md | 3 +- docs/recipes/pdf-engine-flying-saucer.md | 22 +-- docs/recipes/precompiled-code.md | 11 +- docs/recipes/query-async.md | 5 +- docs/recipes/query-handling.md | 15 +- docs/recipes/query-indexes.md | 3 +- docs/recipes/query-listener.md | 3 +- docs/recipes/query-of-queries.md | 67 ++++----- docs/recipes/query-of-query-sometime.md | 11 +- docs/recipes/query-return-type.md | 11 +- .../read-xml-with-a-listener-model-sax.md | 3 +- docs/recipes/request-timeout.md | 17 ++- docs/recipes/retry.md | 3 +- docs/recipes/script-templates.md | 3 +- docs/recipes/startup-listeners-code.md | 13 +- docs/recipes/static-scope-in-components.md | 31 ++-- docs/recipes/sub-components.md | 5 +- docs/recipes/supercharge-your-website.md | 13 +- docs/recipes/thread-task.md | 15 +- docs/recipes/thread-usage.md | 3 +- docs/recipes/timeout.md | 7 +- docs/recipes/types-in-lucee.md | 19 +-- .../using-s3-directly-for-source-code.md | 29 ++-- docs/recipes/virtual-file-system.md | 61 +++++--- docs/recipes/websocket-extension.md | 74 +++++----- docs/recipes/xml-fast-and-easy.md | 3 +- examples/docker/basic/docker-compose.yml | 4 +- examples/docker/wip/docker-compose.yml | 4 +- .../docker/with-config/docker-compose.yml | 4 +- .../docker/with-extension/docker-compose.yml | 4 +- examples/docker/with-patch/docker-compose.yml | 4 +- 78 files changed, 571 insertions(+), 435 deletions(-) diff --git a/.github/workflows/index-recipes.yml b/.github/workflows/index-recipes.yml index 8ffd56d52..d40bfa3d3 100644 --- a/.github/workflows/index-recipes.yml +++ b/.github/workflows/index-recipes.yml @@ -3,9 +3,9 @@ name: Generate Recipes Index on: push: branches: - - '**' # This will trigger on push to any branch + - "**" # This will trigger on push to any branch paths: - - 'docs/recipes/**' + - "docs/recipes/**" workflow_dispatch: jobs: @@ -13,27 +13,27 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "14" - - name: Install dependencies - run: | - npm install fs-extra + - name: Install dependencies + run: | + npm install fs-extra - - name: Generate index - run: | - node .github/scripts/generate-index-recipes.js + - name: Generate index + run: | + node .github/scripts/generate-index-recipes.js - - name: Commit and push changes - run: | - BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/}) - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add docs/recipes/index.json docs/recipes/README.md - git commit -m "Update recipes index and README" - git push origin $BRANCH_NAME + - name: Commit and push changes + run: | + BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/}) + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add docs/recipes/index.json docs/recipes/README.md + git commit -m "Update recipes index and README" + git push origin $BRANCH_NAME diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 683f80cbc..a72179c55 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,9 +7,9 @@ jobs: name: 🧹 Markdown Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: 🥝 Use Node.js - uses: actions/setup-node@v3.5.1 + uses: actions/setup-node@v4 with: node-version: '12.x' - run: npm install -g markdownlint-cli@0.23.2 @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 🍉 Check Out - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 🥥 Install run: | wget -O - -q https://git.io/misspell | sh -s -- -b . @@ -30,8 +30,8 @@ jobs: name: 🧹 YAML Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4.3.0 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9cc101e0b..fed87d524 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,18 +16,18 @@ jobs: runs-on: ubuntu-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: '11' - name: Cache Maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: lucee-script-runner-m2-cache - name: Cache Lucee files - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: _actions/lucee/script-runner/main/lucee-download-cache key: lucee-downloads-${{ env.luceeVersion }} @@ -39,11 +39,11 @@ jobs: with: webroot: ${{ github.workspace }} execute: /build-all.cfm - luceeVersion: 6.0.2.1-SNAPSHOT + luceeVersion: 6.0.3.1 # redis, chart, lucene, form. ajax, chart extensions: 60772C12-F179-D555-8E2CD2B4F7428718;version=3.0.0.54-SNAPSHOT,D46B46A9-A0E3-44E1-D972A04AC3A8DC10,EFDEB172-F52E-4D84-9CD1A1F561B3DFC8,FAD67145-E3AE-30F8-1C11A6CCF544F0B7,6E2CB28F-98FB-4B51-B6BE6C64ADF35473,DF28D0A4-6748-44B9-A2FDC12E4E2E4D38 - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: lucee-docs path: builds/artifacts/lucee-docs.zip @@ -61,7 +61,7 @@ jobs: run: curl https://google.com/ping?sitemap=https://docs.lucee.org/sitemap.xml if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}} # - name: Notify slack - # uses: 8398a7/action-slack@v3.9.1 + # uses: 8398a7/action-slack@v4.9.1 # with: # status: ${{ job.status }} # author_name: GitHub Actions # default: 8398a7@action-slack diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 86eff8c6e..733857778 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,18 +16,18 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: '11' - name: Cache Maven packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.m2 key: lucee-script-runner-m2-cache - name: Cache Lucee files - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: _actions/lucee/script-runner/main/lucee-download-cache key: lucee-downloads-${{ env.luceeVersion }} diff --git a/docs/03.reference/02.tags/queryparam/_attributes/list.md b/docs/03.reference/02.tags/queryparam/_attributes/list.md index 1d87b0b6b..b4d101736 100644 --- a/docs/03.reference/02.tags/queryparam/_attributes/list.md +++ b/docs/03.reference/02.tags/queryparam/_attributes/list.md @@ -2,4 +2,4 @@ True or False, the default is False Indicates whether to process the value attribute as a comma delimited list of values, separated by a separator character. -You can also pass an array as a value which automatically achieves the same result and doesn't require list="true", unless list is explictly set to "false" +You can also pass an array as a value which automatically achieves the same result and doesn't require list="true", unless list is explicitly set to "false" diff --git a/docs/recipes/README.md b/docs/recipes/README.md index 1486b342d..029325fb3 100644 --- a/docs/recipes/README.md +++ b/docs/recipes/README.md @@ -44,7 +44,7 @@ How to define a Datasource in Lucee. Guide on using and running Lucee with Docker -## [Encryption/Decryption ](/docs/recipes/encryption_decryption.md) +## [Encryption/Decryption](/docs/recipes/encryption_decryption.md) This document explains about Encryption/Decryption with public and private keys with simple examples. @@ -96,7 +96,7 @@ Overview of different mapping types in the file system. This document explains how to use a Function Listeners in Lucee. -## [Function SystemOutput #](/docs/recipes/function-systemoutput.md) +## [Function SystemOutput](/docs/recipes/function-systemoutput.md) This document explains the systemoutput function with some simple examples. diff --git a/docs/recipes/application-context-update.md b/docs/recipes/application-context-update.md index 5d514a727..f7998eeb3 100644 --- a/docs/recipes/application-context-update.md +++ b/docs/recipes/application-context-update.md @@ -19,6 +19,7 @@ ] } --> + # Application Context update Lucee allows you to update the existing application context defined for example in [cookbook-application-context-basic]. @@ -43,4 +44,4 @@ This example doesn't extend the existing application mappings with this new one, ``` -Of course, it's not only mappings you can update. [tag-application] lets you update all the settings you can do in the Application.cfc! \ No newline at end of file +Of course, it's not only mappings you can update. [tag-application] lets you update all the settings you can do in the Application.cfc! diff --git a/docs/recipes/archives-creating-and-deploy.md b/docs/recipes/archives-creating-and-deploy.md index 116d74274..d9d55c76d 100644 --- a/docs/recipes/archives-creating-and-deploy.md +++ b/docs/recipes/archives-creating-and-deploy.md @@ -15,6 +15,7 @@ ] } --> + # Archives - 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. @@ -45,8 +46,8 @@ resource: **Full folder path**/component/ After creating the mapping, you need to create an archive file for the CFC. -* Go to the detail view of mycfc mapping page, -* Click the button **assign archive to mapping**. +- Go to the detail view of mycfc mapping page, +- Click the button **assign archive to mapping**. An archive (lar file) is created automatically and saved in `WEB-INF/lucee/context/archives`. @@ -73,8 +74,8 @@ After creating the mapping in the Administrator, you can create an archive file Now you can see both lar files in the `WEB-INF/lucee/context/archives` folder: -* One is `lucee/context/archives/xxx-deploy.lar` file, -* Another one is `lucee/context/archives/xxx-mycfc.lar` +- One is `lucee/context/archives/xxx-deploy.lar` file, +- Another one is `lucee/context/archives/xxx-mycfc.lar` Now you can place the archive files on your target server. @@ -86,4 +87,4 @@ You can now view mappings in the admin. Here you can see the above details in a video: -[Lucee Deploy Archive file](https://www.youtube.com/watch?time_continue=473&v=E9Z0KvspBAY) \ No newline at end of file +[Lucee Deploy Archive file](https://www.youtube.com/watch?time_continue=473&v=E9Z0KvspBAY) diff --git a/docs/recipes/basic-date.md b/docs/recipes/basic-date.md index a0aaf4ce2..4e26da217 100644 --- a/docs/recipes/basic-date.md +++ b/docs/recipes/basic-date.md @@ -14,6 +14,7 @@ ] } --> + # Basic Date - Output the current date The following examples show you how to output the current date. @@ -34,4 +35,4 @@ You can then configure a different locale for the current request in the Applica

The time is #lsDateTimeFormat(date:now(),locale:'de_CH')#

-``` \ No newline at end of file +``` diff --git a/docs/recipes/cached-within-request.md b/docs/recipes/cached-within-request.md index 408431fc4..caf6db077 100644 --- a/docs/recipes/cached-within-request.md +++ b/docs/recipes/cached-within-request.md @@ -19,6 +19,7 @@ ] } --> + # Cache a Query for the current request Perhaps you're familiar with the "cachedwithin" attribute of the tag [tag-query], which is normally used as follows: @@ -41,4 +42,4 @@ Request query caching is a simple solution to this problem. Replace the timespan ``` -Then the query is cached for only the current request, independent of how long the request takes! \ No newline at end of file +Then the query is cached for only the current request, independent of how long the request takes! diff --git a/docs/recipes/caches-defined-in-application-cfc.md b/docs/recipes/caches-defined-in-application-cfc.md index f1efdebb8..7eb284524 100644 --- a/docs/recipes/caches-defined-in-application-cfc.md +++ b/docs/recipes/caches-defined-in-application-cfc.md @@ -21,6 +21,7 @@ ] } --> + # Caches defined in Application.cfc It is possible to add cache connections in Lucee 5.1+ on a per-application basis by adding configuration to your `Application.cfc`. You can also select the default object cache, query cache, function cache, etc. Note if these caches use an extension that provides the cache driver, the extension must be installed already. @@ -57,16 +58,17 @@ The easiest way to generate the code block above is to follow these steps: Let's take a look at some of the keys used to define a cache connection. -* **class** - This is the Java class of the driver for the cache engine. -* **bundleName** - Optional. The name of the OSGI bundle to load the `class` from. -* **bundleVersion** - Optional. The version of the OSGI bundle to load the `class` from. -* **storage** - A boolean that flags whether this cache can be used for client or session storage. -* **custom** - A struct of key/value pairs for configuring the cache. This struct is entirely dependent on the cache driver in use, so refer to the docs for that cache driver to see the possible values. Note, some of these custom values might be required for some cache drivers to work. -* **default** - Optional. If you want this cache to be used as a default cache, then give this one of these values: `function`, `object`, `template`, `query`, `resource`, `include`, `http`, `file`, `webservice`. +- **class** - This is the Java class of the driver for the cache engine. +- **bundleName** - Optional. The name of the OSGI bundle to load the `class` from. +- **bundleVersion** - Optional. The version of the OSGI bundle to load the `class` from. +- **storage** - A boolean that flags whether this cache can be used for client or session storage. +- **custom** - A struct of key/value pairs for configuring the cache. This struct is entirely dependent on the cache driver in use, so refer to the docs for that cache driver to see the possible values. Note, some of these custom values might be required for some cache drivers to work. +- **default** - Optional. If you want this cache to be used as a default cache, then give this one of these values: `function`, `object`, `template`, `query`, `resource`, `include`, `http`, `file`, `webservice`. ## Default Caches When declaring a cache, you can make it the default cache for creation operations, but it is also possible to configure the default caches for each operation all at once in your `Application.cfc` like so: + ```lucee this.cache.object = "myCache"; this.cache.template = "AnotherCache"; @@ -79,4 +81,4 @@ this.cache.file = ""; this.cache.webservice = ""; ``` -A single cache can only be the default storage location for a single operation at a time. For example, a cache named "myCache" cannot both be the default cache for objects as well as queries. \ No newline at end of file +A single cache can only be the default storage location for a single operation at a time. For example, a cache named "myCache" cannot both be the default cache for objects as well as queries. diff --git a/docs/recipes/check-for-changes.md b/docs/recipes/check-for-changes.md index 5fe3cb857..50bbd0483 100644 --- a/docs/recipes/check-for-changes.md +++ b/docs/recipes/check-for-changes.md @@ -13,6 +13,7 @@ ] } --> + # Check for changes in your configuration file automatically Lucee can automatically check for changes in your configuration files from the complete server or a single web context. @@ -51,4 +52,4 @@ And add the same changes from above: Lucee will now check for any changes in the Lucee configuration files every minute, and if there is a change, reload it and enable those changes. -A very handy little feature for those automated deployments! \ No newline at end of file +A very handy little feature for those automated deployments! diff --git a/docs/recipes/checksum.md b/docs/recipes/checksum.md index fe0e083db..b16e1ebf4 100644 --- a/docs/recipes/checksum.md +++ b/docs/recipes/checksum.md @@ -12,6 +12,7 @@ ] } --> + # Checksum This document explains how to use a checksum in Lucee. @@ -53,9 +54,9 @@ dump("something went wrong! give it another try?"); ``` -* Download the jar file by using cfhttp. -* Dump the file response header. You can see the "X-Checksum-MD5" "X-Checksum-SHA1" keys from the file itself. -* Save the file, and dump(fileInfo(localFile.checksum)). Check to see if the dump matches the value of the downloaded file response["X-Checksum-MD5"] header. +- Download the jar file by using cfhttp. +- Dump the file response header. You can see the "X-Checksum-MD5" "X-Checksum-SHA1" keys from the file itself. +- Save the file, and dump(fileInfo(localFile.checksum)). Check to see if the dump matches the value of the downloaded file response["X-Checksum-MD5"] header. Checksum values are hashed from the binaryfile itself. @@ -145,4 +146,4 @@ The above code checks and validates the downloaded file. ## Footnotes You can see the details in this video: -[Checksum](https://www.youtube.com/watch?v=Kb_zSsRDEOg) \ No newline at end of file +[Checksum](https://www.youtube.com/watch?v=Kb_zSsRDEOg) diff --git a/docs/recipes/configuration-administrator-cfc.md b/docs/recipes/configuration-administrator-cfc.md index 0e4b9b03e..36312839c 100644 --- a/docs/recipes/configuration-administrator-cfc.md +++ b/docs/recipes/configuration-administrator-cfc.md @@ -13,6 +13,7 @@ ] } --> + # Configure Lucee within your application Lucee provides a web frontend to configure the server and each web context, but you can also do this configuration from within your application. @@ -31,4 +32,4 @@ admin.updateCharset(resourceCharset: "UTF-8"); // set the resource charset ## cfadmin Tag The component "Administrator" is far from being feature complete, so if you miss a functionality, best consult the unofficial tag "cfadmin" (undocumented) and check out how this tag is used inside the [Lucee Administrator](https://github.com/lucee/Lucee/blob/5.2/core/src/main/java/resource/component/org/lucee/cfml/Administrator.cfc). -Of course, it would be great if you could contribute your addition to the "Administrator" component. \ No newline at end of file +Of course, it would be great if you could contribute your addition to the "Administrator" component. diff --git a/docs/recipes/convert-a-cfml-func-to-java.md b/docs/recipes/convert-a-cfml-func-to-java.md index 9cefa23d8..c3eda0c5c 100644 --- a/docs/recipes/convert-a-cfml-func-to-java.md +++ b/docs/recipes/convert-a-cfml-func-to-java.md @@ -15,6 +15,7 @@ ] } --> + # Convert a CFML Function/Component to use in Java Lucee allows you to convert user-defined functions or components so you can use them in Java. @@ -42,7 +43,7 @@ component { Then you can pass that component to a Java method needing a specific interface/class. ```lucee -// This class has a method that takes as an argument a CharSequence. +// This class has a method that takes as an argument a CharSequence. // This way we can force Lucee to convert/wrap our component to that interface. HashUtil = createObject("java", "lucee.commons.digest.HashUtil"); @@ -76,4 +77,4 @@ numeric function echoInt(numeric i) { if (i == 1) throw "Test output!!!"; return i * 2; } -``` \ No newline at end of file +``` diff --git a/docs/recipes/datasource-how-to-define-them.md b/docs/recipes/datasource-how-to-define-them.md index e8e918298..00f3a7adb 100644 --- a/docs/recipes/datasource-how-to-define-them.md +++ b/docs/recipes/datasource-how-to-define-them.md @@ -13,6 +13,7 @@ ] } --> + # Datasource - How to define them To execute queries, you need a datasource definition, which points to a specific local or remote datasource. There are different ways to do so. @@ -85,4 +86,4 @@ this.datasource = { username: 'root', password: 'encrypted:5120611ea34c6123fd85120a0c27ab23fd81ea34cb854' }; -``` \ No newline at end of file +``` diff --git a/docs/recipes/docker.md b/docs/recipes/docker.md index 927b9603f..f14976fd1 100644 --- a/docs/recipes/docker.md +++ b/docs/recipes/docker.md @@ -23,6 +23,7 @@ Docker is a platform that enables developers to automate the deployment, scaling ## What are the benefits of running Lucee in Docker Running Lucee in Docker provides several key benefits: + - **Consistency and Portability**: Docker containers ensure that Lucee and its dependencies are packaged together, eliminating compatibility issues and reducing setup time. This makes it easier to develop, test, and deploy applications consistently across different environments. - **Scalability**: Docker's lightweight nature allows for efficient scaling of Lucee applications. You can quickly scale up or down based on demand, making it ideal for both small and large-scale deployments. - **Resource Efficiency**: Docker containers share the host system's kernel, which leads to efficient utilization of system resources and improved performance compared to traditional virtual machines. @@ -76,7 +77,7 @@ You can customize your Lucee container by creating your own Dockerfile and addin For more complex setups, consider using Docker Compose to manage multiple services and their dependencies. Below is an example `docker-compose.yml` file to run Lucee with an Nginx reverse proxy: ```yaml -version: '3' +version: "3" services: lucee: diff --git a/docs/recipes/encryption_decryption.md b/docs/recipes/encryption_decryption.md index 3779d4c9c..9c36b80b8 100644 --- a/docs/recipes/encryption_decryption.md +++ b/docs/recipes/encryption_decryption.md @@ -22,16 +22,17 @@ ] } --> -# Encryption/Decryption + +# Encryption/Decryption This document explains about Encryption/Decryption with public and private keys with simple examples. Encryption/Decryption is a new functionality in Lucee 5.3. We have a new way to encrypt/decrypt string values. First we start with keys. In this case, there are two keys: -* Private key to encrypt -* Public key to decrypt +- Private key to encrypt +- Public key to decrypt -## Example 1: +## Example 1: ```luceescript //index.cfm @@ -75,4 +76,4 @@ This is a full detailed example of encrypt/decrypt functions. We create a key an Here you can see these details in the video also: -[Encryption/Decryption with public and private keys](https://www.youtube.com/watch?v=2fgfq-3nWfk) \ No newline at end of file +[Encryption/Decryption with public and private keys](https://www.youtube.com/watch?v=2fgfq-3nWfk) diff --git a/docs/recipes/environment-variables-system-properties.md b/docs/recipes/environment-variables-system-properties.md index 9dfd14b05..fe6c4f339 100644 --- a/docs/recipes/environment-variables-system-properties.md +++ b/docs/recipes/environment-variables-system-properties.md @@ -13,6 +13,7 @@ ] } --> + # Environment Variables / System Properties for Lucee Below is a list of environment variables and system properties you can set for the Lucee Server. @@ -36,6 +37,7 @@ If enabled, Lucee will validate existing datasource connections reused from the **Environment Variable:** `LUCEE_DEBUGGING_OPTIONS` **System Property:** `-Dlucee.debugging.options` Debug options, a comma-separated list of the following possible debug options to enable: + - database - exception - template @@ -179,6 +181,7 @@ Tag Library Descriptor files (.tld or .tldx) Lucee should load to make these tag **Environment Variable:** `LUCEE_LISTENER_MODE` **System Property:** `-Dlucee.listener.mode` Where/how does Lucee look for the Application Listener? + - `currenttoroot` - looks for the file "Application.cfc/Application.cfm" from the current up to the webroot directory. - `currentorroot` - looks for the file "Application.cfc/Application.cfm" in the current directory and in the webroot directory. - `root` - looks for the file "Application.cfc/Application.cfm" only in the webroot. @@ -187,6 +190,7 @@ Where/how does Lucee look for the Application Listener? **Environment Variable:** `LUCEE_LISTENER_TYPE` **System Property:** `-Dlucee.listener.type` Which kind of Application Listener is supported? + - `None` - no listener at all. - `Classical (CFML < 7)` - Classic handling. Lucee looks for the file "Application.cfm" and a corresponding file "OnRequestEnd.cfm". - `Modern` - Modern handling. Lucee only looks for the file "Application.cfc". @@ -205,6 +209,7 @@ Let's say you have the following code: ``` And you have the following mappings defined: + - `/foo/bar` - `/foo` @@ -285,6 +290,7 @@ A boolean value. If enabled, Lucee suppresses whitespace defined between the `cf **Environment Variable:** `LUCEE_SYSTEM_ERR` **System Property:** `-Dlucee.system.err` Where is the error stream of the JVM sent? Possible values are: + - `null` (the stream is ignored) - `class:` - the data is sent to an instance of that class that must implement the `java.io.PrintStream` interface - `file:` - an absolute path to a file name the stream is written to @@ -293,6 +299,7 @@ Where is the error stream of the JVM sent? Possible values are: **Environment Variable:** `LUCEE_SYSTEM_OUT` **System Property:** `-Dlucee.system.out` Where is the out stream of the JVM sent? Possible values are: + - `null` (the stream is ignored) - `class:` - the data is sent to an instance of that class that must implement the `java.io.PrintStream` interface - `file:` - an absolute path to a file name the stream is written to @@ -397,6 +404,7 @@ Tag Library Descriptor files (`.tld` or `.tldx`) Lucee should load to make these **Environment Variable:** `LUCEE_LISTENER_MODE` **System Property:** `-Dlucee.listener.mode` Where/how does Lucee look for the Application Listener? + - `currenttoroot` - looks for the file "Application.cfc/Application.cfm" from the current up to the webroot directory. - `currentorroot` - looks for the file "Application.cfc/Application.cfm" in the current directory and in the webroot directory. - `root` - looks for the file "Application.cfc/Application.cfm" only in the webroot. @@ -405,6 +413,7 @@ Where/how does Lucee look for the Application Listener? **Environment Variable:** `LUCEE_LISTENER_TYPE` **System Property:** `-Dlucee.listener.type` Which kind of Application Listener is supported? + - `None` - no listener at all. - `Classical (CFML < 7)` - Classic handling. Lucee looks for the file "Application.cfm" and a corresponding file "OnRequestEnd.cfm". - `Modern` - Modern handling. Lucee only looks for the file "Application.cfc". @@ -423,6 +432,7 @@ Let's say you have the following code: ``` And you have the following mappings defined: + - `/foo/bar` - `/foo` @@ -503,6 +513,7 @@ A boolean value. If enabled, Lucee suppresses whitespace defined between the `cf **Environment Variable:** `LUCEE_SYSTEM_ERR` **System Property:** `-Dlucee.system.err` Where is the error stream of the JVM sent? Possible values are: + - `null` (the stream is ignored) - `class:` - the data is sent to an instance of that class that must implement the `java.io.PrintStream` interface - `file:` - an absolute path to a file name the stream is written to @@ -511,6 +522,7 @@ Where is the error stream of the JVM sent? Possible values are: **Environment Variable:** `LUCEE_SYSTEM_OUT` **System Property:** `-Dlucee.system.out` Where is the out stream of the JVM sent? Possible values are: + - `null` (the stream is ignored) - `class:` - the data is sent to an instance of that class that must implement the `java.io.PrintStream` interface - `file:` - an absolute path to a file name the stream is written to @@ -534,4 +546,4 @@ Specifies the file location of the trust store that contains trusted Certificate **Environment Variable:** `LUCEE_WEB_CHARSET` **System Property:** `-Dlucee.web.charset` -Default character set for output streams, form-, URL-, and CGI scope variables, and reading/writing the header. \ No newline at end of file +Default character set for output streams, form-, URL-, and CGI scope variables, and reading/writing the header. diff --git a/docs/recipes/event-gateway-create.md b/docs/recipes/event-gateway-create.md index 12fbb21f0..a887ed66d 100644 --- a/docs/recipes/event-gateway-create.md +++ b/docs/recipes/event-gateway-create.md @@ -16,6 +16,7 @@ ] } --> + # Custom Event Gateways Here you will find a short introduction into writing your own Event Gateway type. @@ -24,9 +25,9 @@ Since you can write these in pure CFML (and Java when you want it), it is really There are 2 to 3 files you need to create: -* the Gateway CFC -* the Gateway Driver CFC -* A listener CFC +- the Gateway CFC +- the Gateway Driver CFC +- A listener CFC ## The Gateway CFC @@ -36,18 +37,18 @@ Also, it is the file which is instantiated by Lucee when the gateway starts. You can take the following files as an example: -* {Lucee-install}/lib/lucee-server/context/gateway/lucee/extension/gateway/DirectoryWatcher.cfc -* {Lucee-install}/lib/lucee-server/context/gateway/lucee/extension/gateway/MailWatcher.cfc +- {Lucee-install}/lib/lucee-server/context/gateway/lucee/extension/gateway/DirectoryWatcher.cfc +- {Lucee-install}/lib/lucee-server/context/gateway/lucee/extension/gateway/MailWatcher.cfc The example code shown underneath is a modified version of the DirectoryWatcher.cfc, which, at time of writing, is in line for reviewing at the Lucee team. By default, you need to have the following functions: -* An init function, which receives the necessary config data. -* A start function, which continues to run while variables.state="running". -* A stop and restart function. -* A getState function, which returns the current state of the gateway instance (running, stopping, stopped). -* A sendMessage function, which will be called when the CFML sendGatewayMessage function is used. +- An init function, which receives the necessary config data. +- A start function, which continues to run while variables.state="running". +- A stop and restart function. +- A getState function, which returns the current state of the gateway instance (running, stopping, stopped). +- A sendMessage function, which will be called when the CFML sendGatewayMessage function is used. The following is all the code you need: @@ -141,4 +142,4 @@ Minimalsize: the minimum filesize in bytes. After executing the cfadmin code, or going through the admin screens, you should now have an instance of your own Event Gateway type running! -When creating a Socket gateway or an Instant messaging gateway, you will need to do a bit more coding, but hopefully this instruction helped you out! \ No newline at end of file +When creating a Socket gateway or an Instant messaging gateway, you will need to do a bit more coding, but hopefully this instruction helped you out! diff --git a/docs/recipes/event-gateway-in-app-cfc.md b/docs/recipes/event-gateway-in-app-cfc.md index dc5383903..e645534f6 100644 --- a/docs/recipes/event-gateway-in-app-cfc.md +++ b/docs/recipes/event-gateway-in-app-cfc.md @@ -37,6 +37,7 @@ ] } --> + # Event Handling in Application.cfc Lucee provides several event handling functions within `Application.cfc` that can be used to manage different stages and types of requests. Here is an overview of these functions and their usage. @@ -65,7 +66,7 @@ component { } ``` -### OnRequestStart ### +### OnRequestStart This method is triggered at the start of each request. @@ -115,7 +116,7 @@ component { As arguments you receive the exception (cfcatch block) and the eventName. -## OnAbort +## OnAbort This method is triggered when a request is ended with help of the tag ``. @@ -127,7 +128,7 @@ component { } ``` -## OnDebug +## OnDebug This method is triggered when debugging is enabled for this request. @@ -153,7 +154,7 @@ component { ## Application.cfc Default Template -Below you can find an Application.cfc template that may serve as a starting point for your own applications settings with Lucee CFML engine. +Below you can find an Application.cfc template that may serve as a starting point for your own applications settings with Lucee CFML engine. When creating an Application.cfc for the first time, you can configure all the settings within the Lucee Server or Web Administrator and use its "Export" tool (Lucee Administrator => Settings => Export) to move (by copy and paste) the settings into your Application.cfc file. @@ -261,4 +262,4 @@ component { } } -``` \ No newline at end of file +``` diff --git a/docs/recipes/event-gateways-how-they-work.md b/docs/recipes/event-gateways-how-they-work.md index 5d79f7d38..39bdc5f3d 100644 --- a/docs/recipes/event-gateways-how-they-work.md +++ b/docs/recipes/event-gateways-how-they-work.md @@ -16,6 +16,7 @@ ] } --> + # Event Gateway - How they work? An event gateway is a background process that continuously runs. @@ -34,9 +35,9 @@ Lucee comes with 2 gateways: a Directory watcher and a Mail watcher. This event gateway checks a given directory for file changes. These changes (events) can be: -* new files -* changed files -* removed files +- new files +- changed files +- removed files When this gateway starts, it first takes a snapshot of the current state of the directory. This is the starting point from where changes are calculated. @@ -48,8 +49,8 @@ So if you already have some files in the directory you want to watch, these file You can apply filters for what you exactly want to watch changes for: -* **Watch subdirectories**: same as the "Recurse" option in `` and `directoryList()` -* **Extensions**: an optional list of comma-delimited file extensions. The default is "*", which obviously means "all files". +- **Watch subdirectories**: same as the "Recurse" option in `` and `directoryList()` +- **Extensions**: an optional list of comma-delimited file extensions. The default is "\*", which obviously means "all files". Note: the Extensions setting might be changed in the near future, due to an enhancement request. @@ -63,8 +64,8 @@ Make sure you regularly check the logs, because when anything goes wrong, Lucee Lucee logs can be found here: -* `{Lucee-server}/context/logs/` -* `{Lucee-web}/lucee/logs/` +- `{Lucee-server}/context/logs/` +- `{Lucee-web}/lucee/logs/` You can also view the logs in your web/server admin by installing the Log Analyzer plugin. @@ -121,4 +122,4 @@ Add or update a gateway instance: ```lucee -``` \ No newline at end of file +``` diff --git a/docs/recipes/event-gateways.md b/docs/recipes/event-gateways.md index eb158833b..986ff8e99 100644 --- a/docs/recipes/event-gateways.md +++ b/docs/recipes/event-gateways.md @@ -20,14 +20,15 @@ ] } --> + # Event Gateways First of all, it is necessary to explain how Event Gateways (EG) are working in the first place. EG's are another way to communicate with your Lucee server and are kind of a service running on Lucee, reacting to certain events. These kinds of events could be something along the lines of: -* SMS sent to a certain receiver -* File change happening in a directory -* Mail received on a mail server -* Slack notification received +- SMS sent to a certain receiver +- File change happening in a directory +- Mail received on a mail server +- Slack notification received What then can be done with these events is to trigger some actions that react to these events. For instance, if an SMS is sent to the server asking for the current heap memory space, the server could respond with an SMS returning the details. So you basically have an event producer and an event consumer. @@ -41,8 +42,8 @@ In Lucee, EG's can be written in CFML, and this is what this description is all There are 2 components that are important for writing an event gateway: -* Gateway driver -* Event Gateway +- Gateway driver +- Event Gateway The gateway driver is a CFC that is always instantiated and running. It is responsible for managing the lifecycle of the event gateway. The event gateway is the actual implementation of the event handling logic. @@ -64,7 +65,7 @@ Now the sanity checks kick in and prevent faulty data from being sent to the Gat ``` -We receive the expected blank page. In the background, the message has been passed to the Gateway through the sendGateway() method and the data will be written by the start() endless loop into the logfile with the help of the method _log(). +We receive the expected blank page. In the background, the message has been passed to the Gateway through the sendGateway() method and the data will be written by the start() endless loop into the logfile with the help of the method \_log(). How you actually write your EG is totally up to you. But now, do it in CFML! @@ -72,9 +73,9 @@ How you actually write your EG is totally up to you. But now, do it in CFML! Above we have introduced the possibility to asynchronously log some data to a log file. There are additional other Event Gateways you can think of or use: -* ICQ watcher -* Slack Channel inspector -* Listen to a socket -* On incoming email +- ICQ watcher +- Slack Channel inspector +- Listen to a socket +- On incoming email -The possibilities are huge and we expect several new event gateways to emerge in the next few months. Have fun with Lucee. \ No newline at end of file +The possibilities are huge and we expect several new event gateways to emerge in the next few months. Have fun with Lucee. diff --git a/docs/recipes/event-handling-in-app-cfc.md b/docs/recipes/event-handling-in-app-cfc.md index 503d687d6..87c887f46 100644 --- a/docs/recipes/event-handling-in-app-cfc.md +++ b/docs/recipes/event-handling-in-app-cfc.md @@ -37,6 +37,7 @@ ] } --> + # Event Handling in Application.cfc Lucee provides several event handling functions within `Application.cfc` that can be used to manage different stages and types of requests. Here is an overview of these functions and their usage. @@ -153,7 +154,7 @@ component { ## Application.cfc Default Template -Below you can find an Application.cfc template that may serve as a starting point for your own applications settings with Lucee CFML engine. +Below you can find an Application.cfc template that may serve as a starting point for your own applications settings with Lucee CFML engine. When creating an Application.cfc for the first time, you can configure all the settings within the Lucee Server or Web Administrator and use its "Export" tool (Lucee Administrator => Settings => Export) to move (by copy and paste) the settings into your Application.cfc file. @@ -261,4 +262,4 @@ component { } } -``` \ No newline at end of file +``` diff --git a/docs/recipes/exception-cause.md b/docs/recipes/exception-cause.md index 50540c696..ebe780402 100644 --- a/docs/recipes/exception-cause.md +++ b/docs/recipes/exception-cause.md @@ -13,6 +13,7 @@ ] } --> + # Exception - Cause Lucee 6.1 improves its support for exception causes, providing better debugging and error handling capabilities. @@ -40,7 +41,6 @@ catch(ex) { Thanks to this enhancement, you get not only the tag context and Java stack trace from the top-level exception, but also the same information for the "cause" exception. - ## Parent Thread Context When you throw an exception from a child thread, for example, a `cfhttp` call executed in parallel or an exception inside the `cfthread` tag, you can now see the stack trace from where that thread was started. Previously, you only saw the stack trace within the child thread. With Lucee 6.1, you also get the information from the parent thread as the cause. Consider the following example: @@ -57,4 +57,3 @@ dump(cfthread["testexception"].error.cause.Message); ``` The error not only includes the exception information from within the cfthread tag but also provides information from outside, making debugging much easier as you can see where the tag was called from. - diff --git a/docs/recipes/exception-output.md b/docs/recipes/exception-output.md index c000d47d5..aa8788f3b 100644 --- a/docs/recipes/exception-output.md +++ b/docs/recipes/exception-output.md @@ -22,6 +22,7 @@ ] } --> + # Exceptions Output How to catch and display exceptions @@ -40,7 +41,7 @@ catch ( any e ){ Go on with your code ``` - [tag-Dump] shows the full exception structure without blocking your code. Dump includes all stack trace with it. +[tag-Dump] shows the full exception structure without blocking your code. Dump includes all stack trace with it. ## Example 2 @@ -58,4 +59,4 @@ Go on with your code Here we simply echo the exception. It shows the normal exception without blocking your code. -[https://www.youtube.com/watch?v=vM-4R2A-ZsM](https://www.youtube.com/watch?v=vM-4R2A-ZsM) \ No newline at end of file +[https://www.youtube.com/watch?v=vM-4R2A-ZsM](https://www.youtube.com/watch?v=vM-4R2A-ZsM) diff --git a/docs/recipes/externalizing-strings.md b/docs/recipes/externalizing-strings.md index 1c9ba9d9d..36495f6bf 100644 --- a/docs/recipes/externalizing-strings.md +++ b/docs/recipes/externalizing-strings.md @@ -12,6 +12,7 @@ ] } --> + # 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. We explain this method with a simple example below: @@ -51,4 +52,4 @@ So, the string 'year' is no longer in memory. When the bytecode is called, it lo Here you can see the above details in video -[Externalize strings](https://youtu.be/AUcsHkVFXHE) \ No newline at end of file +[Externalize strings](https://youtu.be/AUcsHkVFXHE) diff --git a/docs/recipes/file-extensions.md b/docs/recipes/file-extensions.md index 1becd4bae..d31f430a5 100644 --- a/docs/recipes/file-extensions.md +++ b/docs/recipes/file-extensions.md @@ -13,6 +13,7 @@ ] } --> + # File Extensions Lucee supports several file extensions for different types of templates and components. The most common extensions are `.cfm`, `.cfc`, `.cfml`, and `.cfs`. Each serves a specific purpose in CFML development. @@ -64,4 +65,4 @@ Since version 6.0, Lucee supports templates with the extension `.cfs`. These tem ```cfs writeOutput("Hello from a .cfs file!"); -``` \ No newline at end of file +``` diff --git a/docs/recipes/filesystem-mapping.md b/docs/recipes/filesystem-mapping.md index b440758e3..9c471242f 100644 --- a/docs/recipes/filesystem-mapping.md +++ b/docs/recipes/filesystem-mapping.md @@ -15,6 +15,7 @@ ] } --> + # File system - Mappings We distinguish 3 different mapping types: @@ -26,4 +27,4 @@ We distinguish 3 different mapping types: * [[cookbook-filesystem-mapping-define-mapping]] * [[cookbook-application-context-set-mapping]] * Define a component Mapping (TODO) -* Define a custom tag Mapping (TODO) \ No newline at end of file +* Define a custom tag Mapping (TODO) diff --git a/docs/recipes/function-listeners.md b/docs/recipes/function-listeners.md index d0277fa72..0275b8f3c 100644 --- a/docs/recipes/function-listeners.md +++ b/docs/recipes/function-listeners.md @@ -13,9 +13,10 @@ ] } --> + # Function Listeners -Lucee 6.1 introduced a new feature called "Function Listeners". This allows you to execute a function (of any kind) in parallel, so you do not have to wait for the result of the execution, similar to using the `cfthread` tag. Function Listeners provide an easy syntax to not only execute a function in parallel but also include support to handle the result by simply adding a listener after the function call. This listener can handle the result or exception of a function. +Lucee 6.1 introduced a new feature called "Function Listeners". This allows you to execute a function (of any kind) in parallel, so you do not have to wait for the result of the execution, similar to using the `cfthread` tag. Function Listeners provide an easy syntax to not only execute a function in parallel but also include support to handle the result by simply adding a listener after the function call. This listener can handle the result or exception of a function. ## Simple Version @@ -38,7 +39,7 @@ dump(request.testFunctionListener ?: "undefined1"); ## Join thread thread -Instead of "run and forget" you can also join the thread with help of the function `threadJoin` (or the tags ``). You get a name from the call and that name you can use to join it. The thread information is available in the scope `cfhread` like a regular thread. +Instead of "run and forget" you can also join the thread with help of the function `threadJoin` (or the tags ``). You get a name from the call and that name you can use to join it. The thread information is available in the scope `cfhread` like a regular thread. ```run @@ -118,7 +119,6 @@ dump(cfthread[threadName].result); ``` - ## Listening on a Component Instantiation You can also listen to a component instantiation. @@ -136,7 +136,7 @@ dump(getMetadata(cfthread[threadName].result).fullname); ``` -## Listening on a Static Component Function +## Listening on a Static Component Function You can also listen to a static component function. @@ -153,10 +153,9 @@ dump(cfthread[threadName].result.columnlist); ``` - ## Function Collection Listener -A listener not necessarly has to be a function, it also can be a function collection (multiple functions inside a struct). +A listener does not need to be a function, it also can be a function collection (multiple functions inside a struct). This way you can define a function for specific events like `onSuccess` or `onFail` like this. ```run @@ -180,7 +179,6 @@ dump(cfthread[threadName1].success); ``` - ## Component Listener You can also define a component instance as a listener, in this case we do a inline component. @@ -191,11 +189,11 @@ function mySuccess() { return "Susi Sorglos"; } -threadName1=mySuccess():new component { +threadName1=mySuccess():new component { function onSuccess(result) { thread.success=result; } -}; +}; // wait for the thread to finish threadJoin(threadName1); @@ -203,10 +201,9 @@ dump(cfthread[threadName1].success); ``` - ## No Listener -In case you wanna simply a asynchron exection, but you don't care about the outcome, you can define no listener at all, simply pass `null` (in this case i use the function `nullValue()`, because only with full null support enabled, the constant `null` is available). +In case you wanna simply a asynchron execution, but you don't care about the outcome, you can define no listener at all, simply pass `null` (in this case i use the function `nullValue()`, because only with full null support enabled, the constant `null` is available). ```run diff --git a/docs/recipes/function-systemoutput.md b/docs/recipes/function-systemoutput.md index 805d71a6a..5113c1329 100644 --- a/docs/recipes/function-systemoutput.md +++ b/docs/recipes/function-systemoutput.md @@ -12,11 +12,12 @@ ] } --> -# Function SystemOutput # + +# Function SystemOutput This document explains the systemoutput function with some simple examples. -## Example 1: ## +## Example 1: ```luceescript @@ -27,7 +28,6 @@ loop query=dir { ``` - ```lucee dump(cgi); // or writedump if you love to write more @@ -37,7 +37,7 @@ echo(now()); // or writeoutput if you love to write more This example has a simple dump with CGI. It displays normally in the browser while we are running example1.cfm. -## Example 2: ## +## Example 2: ```luceescript // example2.cfm @@ -46,7 +46,7 @@ systemOutput(now(),true); // with new line systemOutput() creates output content in the web browser (console). Here the systemoutput has two arguments: first argument _now()_ for current date and time, and second argument _true_ for a new line. Run this in the browser and see the content in the console. -## Example 3: ## +## Example 3: ```luceescript // example3.cfm @@ -55,7 +55,7 @@ systemOutput(now(),true,true); // send to error stream This example uses three arguments: first argument `now()` for current date and time, second argument `true` for a new line, and third argument for the stream. The stream argument indicates which stream the output should go. There are two streams to choose from: "Output stream" and "Error stream". A value of true in the third argument indicates the output should go to the error stream. Run this in the browser and see the contents with the output stream in the console. -## Example 4: ## +## Example 4: ```luceescript // example4.cfm @@ -64,7 +64,7 @@ systemOutput(cgi,true); // complex object In addition to simple strings or simple values, you can also pass complex objects to the SystemOutput() function. In this example we pass CGI as the argument. When you run this in the browser, you get a serialized output in the console. -## Example 5: ## +## Example 5: ```luceescript // example5.cfm @@ -73,8 +73,8 @@ systemOutput("Here we are:",true); // complex object SystemOutput() has another good feature too. There is `` used to show helpful information (where it is, which template, on which line number) while we mouse over the dump content. Lucee will detect and show the stack-trace if we add `` to the SystemOutput() function in our code. When we run this in the browser, we see the stack-trace in the console. -## Footnotes ## +## Footnotes Here you can see these details on video also: -[Function SystemOutput](https://www.youtube.com/watch?v=X_BQPFPD320) \ No newline at end of file +[Function SystemOutput](https://www.youtube.com/watch?v=X_BQPFPD320) diff --git a/docs/recipes/get-dbdriver-from-maven.md b/docs/recipes/get-dbdriver-from-maven.md index 7823e98e5..34df78ce7 100644 --- a/docs/recipes/get-dbdriver-from-maven.md +++ b/docs/recipes/get-dbdriver-from-maven.md @@ -12,9 +12,10 @@ ] } --> + # Get Datasource Drivers Directly from Maven -The following example is for the MySQL driver, but it works for all types of datasource drivers in exactly the same way. +The following example is for the MySQL driver, but it works for all types of datasource drivers in exactly the same way. While you could install the MySQL extension to get the driver you need, it is not necessary. You can simply define the driver as shown below in the `Application.cfc` or `.CFConfig.json`. ## Application.cfc @@ -23,8 +24,8 @@ You can define your datasource in the `Application.cfc` like this: ```lucee this.datasources["mysql"] = { - class: "com.mysql.cj.jdbc.Driver", - bundleName: "com.mysql.cj", + class: "com.mysql.cj.jdbc.Driver", + bundleName: "com.mysql.cj", bundleVersion: "8.4.0", connectionString: "jdbc:mysql://localhost:3307/test?characterEncoding=UTF-8&serverTimezone=CET&maxReconnects=3", username: "root", @@ -73,4 +74,4 @@ Again, if you are unsure about the exact settings, simply install the MySQL exte ## Conclusion -The benefit over simply use the MySQL extension is, you can use the newest version of MySQL or any other DB driver that is fresh from the press, if no Lucee extension exist yet for that version. \ No newline at end of file +The benefit over simply use the MySQL extension is, you can use the newest version of MySQL or any other DB driver that is fresh from the press, if no Lucee extension exist yet for that version. diff --git a/docs/recipes/global-proxy.md b/docs/recipes/global-proxy.md index 88b690c0b..ff5b9c8ef 100644 --- a/docs/recipes/global-proxy.md +++ b/docs/recipes/global-proxy.md @@ -13,6 +13,7 @@ ] } --> + # Global Proxy Since version 6.0, Lucee allows you to define a global proxy in the Application.cfc. @@ -54,4 +55,4 @@ this.proxy = { password: "sorglos", excludes: ["lucee.org", "whatever.com"] }; -``` \ No newline at end of file +``` diff --git a/docs/recipes/hidden-gems.md b/docs/recipes/hidden-gems.md index ab437cae3..590929c2e 100644 --- a/docs/recipes/hidden-gems.md +++ b/docs/recipes/hidden-gems.md @@ -14,6 +14,7 @@ ] } --> + # 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. These concepts are explained with simple examples below: @@ -119,4 +120,4 @@ These simple methods are helpful for defining variables in different ways. Here you can see the above details in the video -[Lucee Hidden Gems](https://youtu.be/4MUKPiQv1kAsss) \ No newline at end of file +[Lucee Hidden Gems](https://youtu.be/4MUKPiQv1kAsss) diff --git a/docs/recipes/index.json b/docs/recipes/index.json index dfb32debc..23394e643 100644 --- a/docs/recipes/index.json +++ b/docs/recipes/index.json @@ -3,7 +3,7 @@ "file": "application-context-update.md", "title": "Application Context update", "path": "/docs/recipes/application-context-update.md", - "hash": "f6ea652f85a6df13749e743930bf8bdd", + "hash": "409a2f3860d5ad4e6d906b3341730352", "keywords": [ "Application Context", "Update Application", @@ -17,7 +17,7 @@ "file": "archives-creating-and-deploy.md", "title": "Archives - Creating and deploying Lucee Archives (.lar files)", "path": "/docs/recipes/archives-creating-and-deploy.md", - "hash": "0d1912d222f3a7fa9d931cd7dd4e1adb", + "hash": "4726b05d39364e952a48ede93b29a67f", "keywords": [ "Lucee", "Archives", @@ -33,7 +33,7 @@ "file": "basic-date.md", "title": "Basic Date - Output the current date", "path": "/docs/recipes/basic-date.md", - "hash": "5235b39654554c5cb736d5b5de60e193", + "hash": "f66410455e64f965fa03df7649e092a3", "keywords": [ "Date", "Current date", @@ -48,7 +48,7 @@ "file": "cached-within-request.md", "title": "Cache a Query for the current request", "path": "/docs/recipes/cached-within-request.md", - "hash": "ef40c4bb574fdcf805bdd6319f6bd63d", + "hash": "caaac5d46fc01f776f8e29abe49c60e5", "keywords": [ "Cache", "Query", @@ -61,7 +61,7 @@ "file": "caches-defined-in-application-cfc.md", "title": "Caches defined in Application.cfc", "path": "/docs/recipes/caches-defined-in-application-cfc.md", - "hash": "2916263e6f7ee08150c576573db649ba", + "hash": "c37a4cb6f4fb432f17b432e56366df13", "keywords": [ "Caches", "Application.cfc", @@ -75,7 +75,7 @@ "file": "check-for-changes.md", "title": "Check for changes in your configuration file automatically", "path": "/docs/recipes/check-for-changes.md", - "hash": "c4e5fb1483292ba2ac9e7ddb5b4fe7c4", + "hash": "c953e038012d3949f25e943018d8688c", "keywords": [ "Configuration", "Check for changes", @@ -89,7 +89,7 @@ "file": "checksum.md", "title": "Checksum", "path": "/docs/recipes/checksum.md", - "hash": "821c7cf3cb72f0084fba50be84aec6c2", + "hash": "a1fef15b4e0bd041aa90bd1cbb126a5d", "keywords": [ "Checksum", "File validation", @@ -102,7 +102,7 @@ "file": "configuration-administrator-cfc.md", "title": "Configure Lucee within your application", "path": "/docs/recipes/configuration-administrator-cfc.md", - "hash": "29a7c63a603f9b3a274070fd658dffb5", + "hash": "c8b3b9c27321db7bec51568b5d8b3a70", "keywords": [ "Administrator.cfc", "cfadmin", @@ -116,7 +116,7 @@ "file": "convert-a-cfml-func-to-java.md", "title": "Convert a CFML Function/Component to use in Java", "path": "/docs/recipes/convert-a-cfml-func-to-java.md", - "hash": "dd524020c59d7bfbf16d94cc95a384cc", + "hash": "0dcbbce8a20bcd390e27d396fd0985e1", "keywords": [ "conversion", "cfc", @@ -131,7 +131,7 @@ "file": "datasource-how-to-define-them.md", "title": "Datasource - How to define them", "path": "/docs/recipes/datasource-how-to-define-them.md", - "hash": "41c394a03fcec0681cd3e101948fed12", + "hash": "612c8cd0a200d9abfc8d5b9497971e88", "keywords": [ "Datasource", "Define datasource", @@ -145,7 +145,7 @@ "file": "docker.md", "title": "Docker Information", "path": "/docs/recipes/docker.md", - "hash": "b34a6869d139c87a4f08bbcae77bfb61", + "hash": "ce8a01b21c6724045884d2ee0cb639d6", "keywords": [ "Docker", "commandbox", @@ -155,9 +155,9 @@ }, { "file": "encryption_decryption.md", - "title": "Encryption/Decryption ", + "title": "Encryption/Decryption", "path": "/docs/recipes/encryption_decryption.md", - "hash": "92ca4f9edf9ef5591c5810b28bc095fa", + "hash": "54975e06c458f45f282e75438d9975b8", "keywords": [ "Encryption", "Decryption", @@ -171,7 +171,7 @@ "file": "environment-variables-system-properties.md", "title": "Environment Variables / System Properties for Lucee", "path": "/docs/recipes/environment-variables-system-properties.md", - "hash": "b315d174fdbe7e634cbaeb91f267b4e1", + "hash": "d030400f1d24d207307c8edbbe5939a3", "keywords": [ "Environment", "Environment Variables", @@ -185,7 +185,7 @@ "file": "event-gateway-create.md", "title": "Custom Event Gateways", "path": "/docs/recipes/event-gateway-create.md", - "hash": "1fc6ced3e73dcd5c28f1fb252011dd39", + "hash": "f82f361b20c0bd9706d81e122024b8bb", "keywords": [ "Event Gateway", "Custom Gateway", @@ -199,7 +199,7 @@ "file": "event-gateway-in-app-cfc.md", "title": "Event Handling in Application.cfc", "path": "/docs/recipes/event-gateway-in-app-cfc.md", - "hash": "4cb6bd674e44b161073bc9d51b8d4d3e", + "hash": "81f8b93eaf6629dcdf512dd247bb5b13", "keywords": [ "Event Handling", "Application.cfc", @@ -218,7 +218,7 @@ "file": "event-gateways-how-they-work.md", "title": "Event Gateway - How they work?", "path": "/docs/recipes/event-gateways-how-they-work.md", - "hash": "ebf05fa35e87524f1ba70adf864ac127", + "hash": "a6dc0c39537f66692fed0d8ca1a66367", "keywords": [ "Event Gateway", "Directory Watcher", @@ -232,7 +232,7 @@ "file": "event-gateways.md", "title": "Event Gateways", "path": "/docs/recipes/event-gateways.md", - "hash": "e381d0d671e6579fa9742f6d29453908", + "hash": "81f72bcc92dd36139b851423c1c7359d", "keywords": [ "Event Gateway", "Custom Gateway", @@ -247,7 +247,7 @@ "file": "event-handling-in-app-cfc.md", "title": "Event Handling in Application.cfc", "path": "/docs/recipes/event-handling-in-app-cfc.md", - "hash": "ea6a1c5411e8ba1a2d8411a6959d8e4e", + "hash": "bc76937b11c5b27128f8d752c843bdae", "keywords": [ "Event Handling", "Application.cfc", @@ -266,7 +266,7 @@ "file": "exception-cause.md", "title": "Exception - Cause", "path": "/docs/recipes/exception-cause.md", - "hash": "23afb27a8171bde8e85bcaacc92b2d6c", + "hash": "d38b239656cae0e99e6784155a48433d", "keywords": [ "exception", "error", @@ -279,7 +279,7 @@ "file": "exception-output.md", "title": "Exceptions Output", "path": "/docs/recipes/exception-output.md", - "hash": "0fadd57697a6296430e2823f9e3fbb18", + "hash": "1ac2a166eb95cc8a7892adbf06fe736c", "keywords": [ "Exception", "Output", @@ -293,7 +293,7 @@ "file": "externalizing-strings.md", "title": "Externalize strings", "path": "/docs/recipes/externalizing-strings.md", - "hash": "643349b358c2bf0079e983730844a891", + "hash": "cac194b9345a0133c8c1985b75b8981f", "keywords": [ "Externalize strings", "Memory reduction", @@ -306,7 +306,7 @@ "file": "file-extensions.md", "title": "File Extensions", "path": "/docs/recipes/file-extensions.md", - "hash": "4c50c5df979593151592a73898d27f42", + "hash": "649c74438e264a8e29eec5ea07aa9eab", "keywords": [ "CFML", "cfm", @@ -320,7 +320,7 @@ "file": "filesystem-mapping.md", "title": "File system - Mappings", "path": "/docs/recipes/filesystem-mapping.md", - "hash": "fe3271c6053ef91099cfe39b10ae05fe", + "hash": "d64043f0e9b8231abd2ff02cc0dd16b1", "keywords": [ "Mapping", "Component mapping", @@ -333,7 +333,7 @@ "file": "function-listeners.md", "title": "Function Listeners", "path": "/docs/recipes/function-listeners.md", - "hash": "8b1a972263b17fa946fe950b0d608f80", + "hash": "fb4c0a4e5e8dc80158edf3dd680c048d", "keywords": [ "parallel", "async", @@ -344,9 +344,9 @@ }, { "file": "function-systemoutput.md", - "title": "Function SystemOutput #", + "title": "Function SystemOutput", "path": "/docs/recipes/function-systemoutput.md", - "hash": "a1abbb5138b19230ca1716819be4fc8c", + "hash": "59046be4f7a342b242f0fcc88468882e", "keywords": [ "SystemOutput function", "Debugging", @@ -359,7 +359,7 @@ "file": "get-dbdriver-from-maven.md", "title": "Get Datasource Drivers Directly from Maven", "path": "/docs/recipes/get-dbdriver-from-maven.md", - "hash": "72cf6841c3f3fde70c53bbaf434aeae3", + "hash": "34d33dd5ea56e9ccfb539c246bdd0f4e", "keywords": [ "datasource", "maven", @@ -371,7 +371,7 @@ "file": "global-proxy.md", "title": "Global Proxy", "path": "/docs/recipes/global-proxy.md", - "hash": "9c9e66206b05f71ea75ecc69c8881137", + "hash": "cdf4145a729621988220682f731e425b", "keywords": [ "CFML", "proxy", @@ -384,7 +384,7 @@ "file": "hidden-gems.md", "title": "Hidden Gems", "path": "/docs/recipes/hidden-gems.md", - "hash": "dbc63c01509338599782a29611c3834c", + "hash": "3ab486e60bde4cd0203f26b5c9078758", "keywords": [ "Hidden gems", "Declare variables", @@ -399,7 +399,7 @@ "file": "inline-components.md", "title": "Inline Component", "path": "/docs/recipes/inline-components.md", - "hash": "bb048506a358e844ade28345398223fa", + "hash": "cfea57ca49e66f2ba76a79d439adf2d8", "keywords": [ "CFML", "component", @@ -411,7 +411,7 @@ "file": "java-in-functions-and-closures.md", "title": "Java in Functions and Closures", "path": "/docs/recipes/java-in-functions-and-closures.md", - "hash": "eb86be0273c7e46a8371dfa7a5e8ea7d", + "hash": "411e845bac8e2978a974ea3af94ab1a5", "keywords": [ "function", "java", @@ -425,7 +425,7 @@ "file": "lazy-queries.md", "title": "Lazy Queries", "path": "/docs/recipes/lazy-queries.md", - "hash": "fb9504f55dbe7278ee4133d63d1345f2", + "hash": "8fe64da123e2f7e52abb3fb4f272c789", "keywords": [ "Lazy Queries", "Regular Queries", @@ -438,7 +438,7 @@ "file": "list-existing-cache-conn.md", "title": "List existing Cache Connections", "path": "/docs/recipes/list-existing-cache-conn.md", - "hash": "94ea7960da8abdaa57091af34f0b60a3", + "hash": "c881e8d1cd05a738dcb92c3dcbaab1fc", "keywords": [ "Cache", "Cache connections", @@ -452,7 +452,7 @@ "file": "loop-labels.md", "title": "Loop Labels", "path": "/docs/recipes/loop-labels.md", - "hash": "fb182a8eb2c29f4a988fc2d55557921e", + "hash": "aea64c62a64313fa7d87e3b8c15ef5cd", "keywords": [ "loop", "label", @@ -466,7 +466,7 @@ "file": "loop-through-files.md", "title": "Looping Through File", "path": "/docs/recipes/loop-through-files.md", - "hash": "f23ff5f744831b4d54171832ca4c7c8a", + "hash": "2387d7589d70fc3977f33db5989a8793", "keywords": [ "Looping through files", "cffile", @@ -480,7 +480,7 @@ "file": "mail-how-to-send-a-mail.md", "title": "Mail - How to send a Mail", "path": "/docs/recipes/mail-how-to-send-a-mail.md", - "hash": "a4ee18b1acdb1a90c1aba12646476952", + "hash": "c278c5dff011da0798117834fdf3c9c7", "keywords": [ "Email", "Send mail", @@ -494,7 +494,7 @@ "file": "mail-listener.md", "title": "Mail Listeners", "path": "/docs/recipes/mail-listener.md", - "hash": "67637ed6ff0a361b9faff6ddfd4b2b14", + "hash": "8cea64daf2a3141d4132d74a4238ac49", "keywords": [ "mail", "listener", @@ -506,7 +506,7 @@ "file": "mappings-how-to-define-a-reg-mapping.md", "title": "Mappings - How to define a regular Mapping", "path": "/docs/recipes/mappings-how-to-define-a-reg-mapping.md", - "hash": "76e5b5a37d504065af80b2896b9fc356", + "hash": "7a3dcbd7f77c1db9f805512d4d17d897", "keywords": [ "Mapping", "Filesystem", @@ -519,7 +519,7 @@ "file": "mathematical-precision.md", "title": "Mathematical Precision", "path": "/docs/recipes/mathematical-precision.md", - "hash": "f0f8a9e8dfdf71bb45600184cf6e0e53", + "hash": "fd0a4bf923840d968652e201575d3fd3", "keywords": [ "CFML", "math", @@ -534,7 +534,7 @@ "file": "monitoring-debugging.md", "title": "Monitoring/Debugging", "path": "/docs/recipes/monitoring-debugging.md", - "hash": "83f0fc803a72ec7fac7c261d8506f72d", + "hash": "598cdd7328ecba6f890d19338abf375f", "keywords": [ "monitoring", "debugging", @@ -550,7 +550,7 @@ "file": "monitoring-enable-for-your-session.md", "title": "Monitoring - Enable for your session", "path": "/docs/recipes/monitoring-enable-for-your-session.md", - "hash": "bc35e167029178cdf65574c0ccbe0ab8", + "hash": "40b88dc626df5c52efe6c02b9e0601e9", "keywords": [ "monitoring", "session" @@ -560,7 +560,7 @@ "file": "null-support.md", "title": "Null Support", "path": "/docs/recipes/null-support.md", - "hash": "6cbb15dd62e482182521d981c642f21d", + "hash": "1632a30798317207a90f34f6c1167b74", "keywords": [ "Null support", "null keyword", @@ -573,7 +573,7 @@ "file": "pdf-engine-flying-saucer.md", "title": "PDF Engine - Flying Saucer (CFDocument)", "path": "/docs/recipes/pdf-engine-flying-saucer.md", - "hash": "8ea63c485f463bef34846d079d231d42", + "hash": "58a53f406410c3915ad12f6bde20f158", "keywords": [ "Flying Saucer", "PDF Engine", @@ -585,7 +585,7 @@ "file": "precompiled-code.md", "title": "Precompiled Code", "path": "/docs/recipes/precompiled-code.md", - "hash": "7cde26a3a57208b065a752524945d4c1", + "hash": "106f0b51ff0b285f474d8b64add272d2", "keywords": [ "Precompiled", "Pre-compile code", @@ -600,7 +600,7 @@ "file": "query-async.md", "title": "Query Async", "path": "/docs/recipes/query-async.md", - "hash": "c34897c0d058b3b7107c7c5dbd99d18e", + "hash": "185df889c6bf4de47668895c9c708d94", "keywords": [ "query", "async", @@ -613,7 +613,7 @@ "file": "query-handling.md", "title": "Query Handling in Lucee", "path": "/docs/recipes/query-handling.md", - "hash": "37936377a77a958043c262773d6cfaba", + "hash": "f18d07bcde6c11ea5fd7aae6985643d0", "keywords": [ "Query", "SQL", @@ -628,7 +628,7 @@ "file": "query-indexes.md", "title": "Query Indexes", "path": "/docs/recipes/query-indexes.md", - "hash": "845d8e3b4d135e50ca439465cc7441c6", + "hash": "e1d9bdad9e6a50cc9d6ee1bb08b36765", "keywords": [ "query", "indexes", @@ -639,7 +639,7 @@ "file": "query-listener.md", "title": "Query Listeners", "path": "/docs/recipes/query-listener.md", - "hash": "e2325c2ef8ac68da95653f7fd5e1b473", + "hash": "9497bb3976a1910f94c2a631a43bc5eb", "keywords": [ "query", "listener", @@ -652,7 +652,7 @@ "file": "query-of-queries.md", "title": "Query of Queries (QoQ)", "path": "/docs/recipes/query-of-queries.md", - "hash": "457790642e8f4a4206decad94eedec20", + "hash": "0260dff0425bb3cd893ac4767cd8e4e2", "keywords": [ "Query of Queries", "QoQ", @@ -666,7 +666,7 @@ "file": "query-of-query-sometime.md", "title": "Query of Queries sometimes it rocks, sometimes it sucks", "path": "/docs/recipes/query-of-query-sometime.md", - "hash": "841824f8dc8ecf1f1be52165574e89a0", + "hash": "9aa140cf0b422b4a0a96d52c5fbe9835", "keywords": [ "Query of Queries", "QoQ", @@ -680,7 +680,7 @@ "file": "query-return-type.md", "title": "Query return type", "path": "/docs/recipes/query-return-type.md", - "hash": "4b6110717327263bec3b2a0e8439e1b4", + "hash": "792f4fe5807a39611254146c37100db9", "keywords": [ "Query return type", "Array return type", @@ -693,7 +693,7 @@ "file": "read-xml-with-a-listener-model-sax.md", "title": "Read XML with a listener Model (SAX)", "path": "/docs/recipes/read-xml-with-a-listener-model-sax.md", - "hash": "edbe80eecafcb10f1d0ee7faa95e5b9f", + "hash": "b0f18d5228f3cf2e7a889d7c3954b844", "keywords": [ "XML", "SAX", @@ -707,7 +707,7 @@ "file": "request-timeout.md", "title": "Request Timeout", "path": "/docs/recipes/request-timeout.md", - "hash": "8f3386a44db2fe4e3885f7ac8071d7fc", + "hash": "d29d7f0ace7a4a6b683c825af4fd36aa", "keywords": [ "request timeout", "timeout", @@ -724,7 +724,7 @@ "file": "retry.md", "title": "Retry", "path": "/docs/recipes/retry.md", - "hash": "8e93cf8f7b9b0d433c435b4824d5e175", + "hash": "d6639c1b5be93b3de2d93e22ae0e4d8f", "keywords": [ "Retry", "Exception handling", @@ -736,7 +736,7 @@ "file": "script-templates.md", "title": "Script Templates", "path": "/docs/recipes/script-templates.md", - "hash": "2a12bbaf30d398fd1dfd1974dcddb7c6", + "hash": "a31ad423369d46df7824c7c2e952d086", "keywords": [ "CFML", "script", @@ -749,7 +749,7 @@ "file": "startup-listeners-code.md", "title": "Startup Listeners, server.cfc and web.cfc", "path": "/docs/recipes/startup-listeners-code.md", - "hash": "195a873d1c4af91f02c8483928752146", + "hash": "eaf0946f77c21255a4b452601a3e2328", "keywords": [ "Startup Listeners", "server.cfc", @@ -762,7 +762,7 @@ "file": "static-scope-in-components.md", "title": "Static scope in components", "path": "/docs/recipes/static-scope-in-components.md", - "hash": "0b27923f6dad322eae638a8081585f34", + "hash": "4ef213604dc8a1abf5335bc1a1073a74", "keywords": [ "Static scope", "Components", @@ -776,7 +776,7 @@ "file": "sub-components.md", "title": "Sub Component", "path": "/docs/recipes/sub-components.md", - "hash": "fdce0dce415076cca6557352e5db9b13", + "hash": "479f64357ac885abaa16ac74dc171612", "keywords": [ "CFML", "component", @@ -788,7 +788,7 @@ "file": "supercharge-your-website.md", "title": "Supercharge your website", "path": "/docs/recipes/supercharge-your-website.md", - "hash": "28da40f56b2a1064b5f268c5f41a7b17", + "hash": "cba98355eb7396979f04febd592cee35", "keywords": [ "Supercharge website", "Performance", @@ -801,7 +801,7 @@ "file": "thread-task.md", "title": "Thread Task", "path": "/docs/recipes/thread-task.md", - "hash": "65e3d23637aae905e0f1d3b7c41a0c3e", + "hash": "e0fb0c5456add34c97c1adf447cd77fb", "keywords": [ "Thread Tasks", "Daemon Threads", @@ -814,7 +814,7 @@ "file": "thread-usage.md", "title": "Thread Usage", "path": "/docs/recipes/thread-usage.md", - "hash": "3233f5284e28275a94b0144c6e5f74af", + "hash": "04376a0a607d55b64c206cdd386f08d1", "keywords": [ "Threads", "Parallel execution", @@ -827,7 +827,7 @@ "file": "timeout.md", "title": "Timeout", "path": "/docs/recipes/timeout.md", - "hash": "6c5108c34266748363a2da76111e99d0", + "hash": "b7e03149be0aa44af86508797a0f675c", "keywords": [ "tag", "timeout", @@ -841,7 +841,7 @@ "file": "types-in-lucee.md", "title": "Types in Lucee", "path": "/docs/recipes/types-in-lucee.md", - "hash": "0bb4f5ca1491ff47a62560c4b49c72ca", + "hash": "5c5fcd8d807661d0f0988282fe41b9a2", "keywords": [ "Types", "Function argument", @@ -854,7 +854,7 @@ "file": "using-s3-directly-for-source-code.md", "title": "Using S3 directly for source code", "path": "/docs/recipes/using-s3-directly-for-source-code.md", - "hash": "aef1e1ac3b5d84fe51178dfe9f052fed", + "hash": "4fc9da16c9ed40562120ffacaad51a80", "keywords": [ "S3", "Source code", @@ -867,7 +867,7 @@ "file": "virtual-file-system.md", "title": "Virtual File Systems", "path": "/docs/recipes/virtual-file-system.md", - "hash": "6189e6e5acde127a186e8c130a18028d", + "hash": "46240b85031475591b0fa9c17b7d1a40", "keywords": [ "Virtual File System", "VFS", @@ -899,7 +899,7 @@ "file": "websocket-extension.md", "title": "WebSocket Extension", "path": "/docs/recipes/websocket-extension.md", - "hash": "0f57f04b9ffb8e338495d49d180b93fa", + "hash": "849d999dd657e7a8485b15f2656fe969", "keywords": [ "Lucee", "Extension" @@ -909,7 +909,7 @@ "file": "xml-fast-and-easy.md", "title": "XML Fast And Easy, using SAX - Listener Functions", "path": "/docs/recipes/xml-fast-and-easy.md", - "hash": "6bfe4e1c0d24881bb3571c998a99afa6", + "hash": "4d5bdb9d198add9a48817d95c1888e40", "keywords": [ "XML parsing", "SAX", diff --git a/docs/recipes/inline-components.md b/docs/recipes/inline-components.md index 2bdaf4acc..8ae66b366 100644 --- a/docs/recipes/inline-components.md +++ b/docs/recipes/inline-components.md @@ -12,6 +12,7 @@ ] } --> + # Inline Component Since Lucee 6.0, Lucee allows you to create inline components. These are components you can create directly in your CFML code, with no need to create a .cfc file for it. This feature allows you to directly use them, similar to closures. @@ -20,12 +21,12 @@ This example shows how to create an inline component and then use it: ```run -inline = new component { +inline = new component { function subTest() { return "inline
"; - } -}; + } +}; dump("inline->" & inline.subTest()); dump(inline);
-``` \ No newline at end of file +``` diff --git a/docs/recipes/java-in-functions-and-closures.md b/docs/recipes/java-in-functions-and-closures.md index 341a625a2..60b377f51 100644 --- a/docs/recipes/java-in-functions-and-closures.md +++ b/docs/recipes/java-in-functions-and-closures.md @@ -14,6 +14,7 @@ ] } --> + # Java in Functions and Closures You can write CFML code directly in a function or a closure. @@ -34,7 +35,7 @@ int function echoInt(int i) type="java" { Of course, the function can also be part of a component. ```lucee -component { +component { int function echoInt(int i) type="java" { if (i == 1) throw new Exception("Test output!!!"); return i * 2; @@ -52,4 +53,4 @@ int function echoInt(int i) type="java" { return i * 2; } dump(echoInt(1)); -``` \ No newline at end of file +``` diff --git a/docs/recipes/lazy-queries.md b/docs/recipes/lazy-queries.md index dd1236ff3..3da3061de 100644 --- a/docs/recipes/lazy-queries.md +++ b/docs/recipes/lazy-queries.md @@ -15,6 +15,7 @@ ] } --> + # Lazy Queries This document explains about lazy queries with some simple examples as follows: @@ -35,9 +36,9 @@ loop query=qry { } ``` -1) In this example, we have a simple task. All statements return a result set with 200,000 records. We output the first ten. Then we make a break when we add ten rows. +1. In this example, we have a simple task. All statements return a result set with 200,000 records. We output the first ten. Then we make a break when we add ten rows. -2) We execute this in the browser and we get the expected result. +2. We execute this in the browser and we get the expected result. ## Example 2 @@ -96,4 +97,4 @@ Execute that example in the browser. The regular query takes 41 milliseconds and ## Footnotes You can see the details in this video: -[Lazy Query](https://youtu.be/X8_TB1py8n0) \ No newline at end of file +[Lazy Query](https://youtu.be/X8_TB1py8n0) diff --git a/docs/recipes/list-existing-cache-conn.md b/docs/recipes/list-existing-cache-conn.md index 931c5035a..7600978b1 100644 --- a/docs/recipes/list-existing-cache-conn.md +++ b/docs/recipes/list-existing-cache-conn.md @@ -16,6 +16,7 @@ ] } --> + # List existing Cache Connections There is now a built-in function in Lucee to list existing cache connections, but you can also easily do this using the following: @@ -45,4 +46,4 @@ boolean function hasCache(required string cacheName) { } ``` -This is a variation of this function that checks if a cache with the given name exists. \ No newline at end of file +This is a variation of this function that checks if a cache with the given name exists. diff --git a/docs/recipes/loop-labels.md b/docs/recipes/loop-labels.md index 8d58bd2b8..7295bbf7c 100644 --- a/docs/recipes/loop-labels.md +++ b/docs/recipes/loop-labels.md @@ -13,6 +13,7 @@ ] } --> + # Loop Labels Lucee supports labels for all loop tags and statements, allowing you to control the flow of nested loops more precisely. @@ -35,6 +36,7 @@ In this example, the `break` statement is used with a label to exit the outer lo ``` + Here, the `cfbreak` statement with the `outerLoop` label causes the loop to break out of the outer loop, not just the inner loop. As a result, only a single time value is printed. ### Script-Based Example diff --git a/docs/recipes/loop-through-files.md b/docs/recipes/loop-through-files.md index 32b3c6449..8eff546ca 100644 --- a/docs/recipes/loop-through-files.md +++ b/docs/recipes/loop-through-files.md @@ -13,6 +13,7 @@ ] } --> + # Looping Through File This document explains how to handle big files in Lucee in a better way. The classic way that you are familiar with uses cffile tag, fileRead, and fileReadBinary functions to read the file into memory. This is a simple solution, but it consumes a lot of memory. @@ -37,9 +38,9 @@ dump(label:"Array Size",var:len(arr)); In the example above, -* Read the file into the memory -* Split into array -* Loop over the array +- Read the file into the memory +- Split into array +- Loop over the array It consumes a lot of memory. @@ -68,4 +69,4 @@ In the above example, loop through the file and get each line, so in memory ther Here you can see the above details in a video: -[Looping through Files](https://www.youtube.com/watch?v=6w2Wr8snk50) \ No newline at end of file +[Looping through Files](https://www.youtube.com/watch?v=6w2Wr8snk50) diff --git a/docs/recipes/mail-how-to-send-a-mail.md b/docs/recipes/mail-how-to-send-a-mail.md index 2b685b720..5ff3a2f97 100644 --- a/docs/recipes/mail-how-to-send-a-mail.md +++ b/docs/recipes/mail-how-to-send-a-mail.md @@ -19,6 +19,7 @@ ] } --> + # Mail - How to send a Mail The following example shows you how you can send a mail. Before you can use this functionality, you have to define a Mail server in the Lucee Administrator. diff --git a/docs/recipes/mail-listener.md b/docs/recipes/mail-listener.md index cf7cb4b08..5af034d91 100644 --- a/docs/recipes/mail-listener.md +++ b/docs/recipes/mail-listener.md @@ -12,6 +12,7 @@ ] } --> + # Mail Listeners Since Lucee 6.0, you can define a listener in the Application.cfc to listen to or manipulate every mail executed. @@ -51,4 +52,4 @@ component { systemOutput(arguments.keyList(), 1, 1); } } -``` \ No newline at end of file +``` diff --git a/docs/recipes/mappings-how-to-define-a-reg-mapping.md b/docs/recipes/mappings-how-to-define-a-reg-mapping.md index 56a5112ba..0b666a83e 100644 --- a/docs/recipes/mappings-how-to-define-a-reg-mapping.md +++ b/docs/recipes/mappings-how-to-define-a-reg-mapping.md @@ -21,6 +21,7 @@ ] } --> + # Mappings - How to define a regular Mapping Lucee allows you to define a mapping to a specific location in a filesystem, so you don't always have to use the full path. In most cases, the full path is not working anyway, for example with [tag-include] which does not work with a full path. @@ -102,4 +103,4 @@ component { ## See Also - [Forcing Lucee to re-check the physical paths of application defined mappings without a restart](https://blog.simplicityweb.co.uk/123/forcing-lucee-to-re-check-the-physical-paths-of-application-defined-mappings-without-a-restart) -- [Confusion Over this.mappings And expandPath() Not Working In Lucee](https://www.bennadel.com/blog/3718-confusion-over-this-mappings-and-expandpath-not-working-in-lucee-cfml-5-3-3-62.htm) \ No newline at end of file +- [Confusion Over this.mappings And expandPath() Not Working In Lucee](https://www.bennadel.com/blog/3718-confusion-over-this-mappings-and-expandpath-not-working-in-lucee-cfml-5-3-3-62.htm) diff --git a/docs/recipes/mathematical-precision.md b/docs/recipes/mathematical-precision.md index 0e3329eaf..8fbaa5628 100644 --- a/docs/recipes/mathematical-precision.md +++ b/docs/recipes/mathematical-precision.md @@ -15,6 +15,7 @@ ] } --> + # Mathematical Precision So far, Lucee has handled numbers internally as “double”, but with Lucee 6 we have switched to “BigDecimal”. This makes math operations much more precise and there is no need anymore to use the function “PrecisionEvaluate”. @@ -27,4 +28,4 @@ this.preciseMath = false; ## System Property / Environment Variable -You can also change that behavior with the system property `-Dlucee.precise.math=false` or with the environment variable `LUCEE_PRECISE_MATH=false`. \ No newline at end of file +You can also change that behavior with the system property `-Dlucee.precise.math=false` or with the environment variable `LUCEE_PRECISE_MATH=false`. diff --git a/docs/recipes/monitoring-debugging.md b/docs/recipes/monitoring-debugging.md index 5f6c9f49b..08639fc60 100644 --- a/docs/recipes/monitoring-debugging.md +++ b/docs/recipes/monitoring-debugging.md @@ -16,21 +16,27 @@ ] } --> + # Monitoring/Debugging Lucee 6.1 changed how you handle Monitoring/Debugging. ## Old Behaviour + Previously, you could enable/disable Debugging in the Lucee admin, and enable/disable specific debug options like showing template execution. With the tag ``, you could define whether the debugging is shown or not. ## New Behaviour + Lucee 6 has completely overhauled this functionality. Instead of having "Metrics" and "Reference" as part of the "Modern" Debug Template, they are now independently controlled under the new umbrella term "Monitoring". ### Lucee Admin + The "debugging" settings are now under the group "Monitoring" and there is a new page called "Output". #### Page "Output" + On the "Output" page, you define which sections of monitoring are shown: + - Debugging - Metrics - Documentation (formerly "Reference") @@ -39,18 +45,23 @@ On the "Output" page, you define which sections of monitoring are shown: This is similar to the action `` (more on that tag later). #### Page "Settings" + You no longer enable/disable debug as a whole, only the options. If no options are enabled, debugging is disabled. Thus, the general switch was/is not really needed anymore. #### Page "Debug Templates" + Here you can choose the debug template you want to use. You can limit it to a specific IP Range if you like, and you can also define different templates for different IP Ranges, though one template can cover all requests. #### Page "Logs" + This page allows you to show the last X requests (depending on your settings), which is useful if no debugging is shown on the output. ### Application.cfc + Lucee 6.1 now allows you to overwrite all these settings in the Application.cfc, which was not possible in previous versions. You can define what is shown: + ```lucee this.monitoring.showDebug = true; this.monitoring.showDoc = true; @@ -59,6 +70,7 @@ this.monitoring.showTest = true; // following soon ``` And also enable/disable debug options: + ```lucee this.monitoring.debuggingTemplate = true; this.monitoring.debuggingDatabase = true; @@ -73,12 +85,14 @@ this.monitoring.debuggingThread = true; You can also export all these settings in the Lucee Administrator on the Monitoring/Settings page. ### In Your Code + Even after the Application.cfc, you can still change these settings. With the help of the tag ``: + ```lucee -`: ``` Or with the tag `` you can change the "show" settings (not the debug options): + ```lucee -` you can change the "show" settings (not the debug ``` #### Downside/Upside + Of course, when you enable, for example, "debuggingTemplate" in your code, everything that happened before was not logged and is lost. But this can also be a benefit, as it allows you to do things like this: + ```lucee try { application action="update" debuggingTemplate=false; @@ -110,22 +127,29 @@ try { This way, you can prevent Lucee from logging certain code. ## Tab Documentation (formerly Reference) + This tab now not only gives you a function and tag reference, it also provides all kinds of "recipes" like this. ## Backward Compatibility + These new features are fully backward compatible. ### Tag cfsetting + The old attribute "showDebugOutput" is now an alias to the newly introduced "show" attribute. This means with this attribute you can still enable/disable Monitoring as a whole. So when you do: + ```lucee ``` + It will not show the monitoring at all, the same way as you would do: + ```lucee ``` ## Conclusion -Lucee 6.1 gives you full control over Monitoring in your code, making it easier for every developer to use it. \ No newline at end of file + +Lucee 6.1 gives you full control over Monitoring in your code, making it easier for every developer to use it. diff --git a/docs/recipes/monitoring-enable-for-your-session.md b/docs/recipes/monitoring-enable-for-your-session.md index 934df85b7..473dbf3c7 100644 --- a/docs/recipes/monitoring-enable-for-your-session.md +++ b/docs/recipes/monitoring-enable-for-your-session.md @@ -2,7 +2,7 @@ { "title": "Monitoring - Enable for your session", "id": "monitoring-enable-for-your-session", - "since": "6.1", + "since": "6.1", "categories": [ "monitoring" ], @@ -48,6 +48,7 @@ this.monitoring.debuggingThread = session.show; To show debugging, add `show=true` to the URL. To disable debugging, add `show=false` to the URL. For example: + - Enable debugging: `https://yourdomain.com?show=true` - Disable debugging: `https://yourdomain.com?show=false` @@ -64,6 +65,7 @@ if (!isNull(url.fsdfsdfdfgdgdfs) || isNull(session.show)) { In this case, use `fsdfsdfdfgdgdfs=true` to enable debugging and `fsdfsdfdfgdgdfs=false` to disable it. For example: + - Enable debugging: `https://yourdomain.com?fsdfsdfdfgdgdfs=true` - Disable debugging: `https://yourdomain.com?fsdfsdfdfgdgdfs=false` diff --git a/docs/recipes/null-support.md b/docs/recipes/null-support.md index e520cb329..e8329f8db 100644 --- a/docs/recipes/null-support.md +++ b/docs/recipes/null-support.md @@ -16,6 +16,7 @@ ] } --> + # 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`. It is an annotation of the video found here: [https://www.youtube.com/watch?v=GSlWfLR8Frs](https://www.youtube.com/watch?v=GSlWfLR8Frs) @@ -81,4 +82,4 @@ With **full support**, you are able to use the `null` keyword directly and, as i ```luceescript t = null; dump( t ); -``` \ No newline at end of file +``` diff --git a/docs/recipes/pdf-engine-flying-saucer.md b/docs/recipes/pdf-engine-flying-saucer.md index 778cd59ae..68aac9d9e 100644 --- a/docs/recipes/pdf-engine-flying-saucer.md +++ b/docs/recipes/pdf-engine-flying-saucer.md @@ -18,22 +18,24 @@ ] } --> + # PDF Engine - Flying Saucer (CFDocument) + This document provides information about the new PDF engine, [Flying Saucer](https://github.com/flyingsaucerproject/flyingsaucer) (FS) in Lucee 5.3 Flying saucer is a new PDF engine in Lucee. PDF engines are mainly used to convert HTML to PDF format. ## Benefits of moving to Flying Saucer from the old engine (PD4ML) -* Full support for CSS 2.1 -* On average the generated PDFs are smaller -* Consume less Memory and CPU -* Engine in active development, -* Better Results +- Full support for CSS 2.1 +- On average the generated PDFs are smaller +- Consume less Memory and CPU +- Engine in active development, +- Better Results ## Downsides to Flying Saucer compared to the old engine (PD4ML) -* The generated PDF does not always look exactly the same when generated with the new FC compared to files generated with the PD4ML. +- The generated PDF does not always look exactly the same when generated with the new FC compared to files generated with the PD4ML. If it's important that the PDF output remains exactly the same as the old PD4ML-generated file, you will need to check it manually. @@ -59,11 +61,11 @@ and since the PDF Extension 1.0.0.92-SNAPSHOT you can specify the engine using t ``` -## Features of Flying Saucer +## Features of Flying Saucer You can define a font directory where you have the fonts(.ttf,.otf) you are using in your PDF. -## Define the font directory +## Define the font directory ```lucee @@ -87,7 +89,7 @@ If the font directory isn't specified, Lucee will look for fonts in /WEB_INF/luc **Note**: Classic engine works using the font-family-name from pd4fonts.properties file. Modern (Flying saucer) engine works using the font-family-name from the .ttf file with the same case. -### Simplify Attributes +### Simplify Attributes Attributes with cfdocument are a mess. You can make it clearer using the following syntax: @@ -122,4 +124,4 @@ If you find any issues while using the new PDF engine, please ask a question on ## Footnotes You can see the details in this video: -[Flying saucer](https://www.youtube.com/watch?v=B3Yfa8SUKKg) \ No newline at end of file +[Flying saucer](https://www.youtube.com/watch?v=B3Yfa8SUKKg) diff --git a/docs/recipes/precompiled-code.md b/docs/recipes/precompiled-code.md index 4e74c6908..1dfb88b85 100644 --- a/docs/recipes/precompiled-code.md +++ b/docs/recipes/precompiled-code.md @@ -14,6 +14,7 @@ ] } --> + # Precompiled Code This document explains how to pre-compile code for a production server while the source code is deployed. This method avoids compilation on the production server for security reasons. We explain this method with a simple example below: @@ -30,16 +31,16 @@ writeoutput(now()); Run this index.cfm page in the browser. -* When a cfm or cfc file is executed for the first time (or after the file has been edited), a class file holding the java byte-code representing that CFML file is automatically created within the cfclasses folder, webroot --> WEB-INF --> lucee --> cfclasses folder, in a sub-folder representing your application's context, for example `CFC__lucee_tomcat_webapps_ROOT4900`. (Differently from Adobe ColdFusion, a separate class file is not created for each method/function within a cfc/cfm file.) +- When a cfm or cfc file is executed for the first time (or after the file has been edited), a class file holding the java byte-code representing that CFML file is automatically created within the cfclasses folder, webroot --> WEB-INF --> lucee --> cfclasses folder, in a sub-folder representing your application's context, for example `CFC__lucee_tomcat_webapps_ROOT4900`. (Differently from Adobe ColdFusion, a separate class file is not created for each method/function within a cfc/cfm file.) -* After executing a request to our `/sample/index.cfm` example above, a class file named `index_cfm$cf.class` will be created within a `sample` folder of the cfclasses folder for our application's context. +- After executing a request to our `/sample/index.cfm` example above, a class file named `index_cfm$cf.class` will be created within a `sample` folder of the cfclasses folder for our application's context. -* To demonstrate how you can deploy that compiled byte-code for a cfm as if it was the cfm itself, you can copy that class file and paste it into your original application folder (\webapps\ROOT\sample). Since you already have the original index.cfm there, rename this class file to `test.cfm`. +- To demonstrate how you can deploy that compiled byte-code for a cfm as if it was the cfm itself, you can copy that class file and paste it into your original application folder (\webapps\ROOT\sample). Since you already have the original index.cfm there, rename this class file to `test.cfm`. -* Finally, run the `/sample/test.cfm` file in your browser. It should show the same results as the index.cfm file would. +- Finally, run the `/sample/test.cfm` file in your browser. It should show the same results as the index.cfm file would. ## Footnotes Here you can see the above details in a video: -[Lucee Precompiled Code](https://www.youtube.com/watch?v=Yjy3bQJgphA) \ No newline at end of file +[Lucee Precompiled Code](https://www.youtube.com/watch?v=Yjy3bQJgphA) diff --git a/docs/recipes/query-async.md b/docs/recipes/query-async.md index ba482a8c6..b8ecb2902 100644 --- a/docs/recipes/query-async.md +++ b/docs/recipes/query-async.md @@ -13,6 +13,7 @@ ] } --> + # Query Async Since Lucee 6.0, you can define that a query gets executed asynchronously. Asynchronous execution of queries is useful in many cases where you don’t want to wait for a query to be executed. You can now set a simple flag to enable this feature. @@ -25,7 +26,7 @@ This example shows how to define a query for async execution: query async=true { ~~~ update user set lastAccess=now() -~~~ +~~~ } ``` @@ -45,4 +46,4 @@ query datasource="mysql" async=true listener={ ## Other Option -Since Lucee 6.1, this can also be done with the help of "function listeners". \ No newline at end of file +Since Lucee 6.1, this can also be done with the help of "function listeners". diff --git a/docs/recipes/query-handling.md b/docs/recipes/query-handling.md index 602cb95e4..474ead886 100644 --- a/docs/recipes/query-handling.md +++ b/docs/recipes/query-handling.md @@ -22,6 +22,7 @@ ] } --> + # Query Handling in Lucee This document explains how SQL queries are supported in Lucee. @@ -53,8 +54,8 @@ The [tag-QueryParam] is used inside the [tag-query] tag. It is used to bind the Passing values with [tag-QueryParam] has two advantages: -* The value you pass in QueryParam is very secure. -* Lucee is able to cache the query statement and reuse it as long as the value is unchanged. +- The value you pass in QueryParam is very secure. +- Lucee is able to cache the query statement and reuse it as long as the value is unchanged. ### Params @@ -112,10 +113,10 @@ dump(res); Use `QueryBuilder("test")` as constructor. -* Define a datasource with constructor or `setDatasource('test')` function. -* Use `select("lastName")` to select the column. -* Use `from("person")` from which table you want to retrieve data. -* Where statement like `where(QB::eq("firstname", "Susi"))`. +- Define a datasource with constructor or `setDatasource('test')` function. +- Use `select("lastName")` to select the column. +- Use `from("person")` from which table you want to retrieve data. +- Where statement like `where(QB::eq("firstname", "Susi"))`. Use `qb.execute()` to obtain the result. @@ -152,4 +153,4 @@ dump(res); Here you can see the above details in a video: -[https://www.youtube.com/watch?time_continue=684&v=IMdPM58guUQ](https://www.youtube.com/watch?time_continue=684&v=IMdPM58guUQ) \ No newline at end of file +[https://www.youtube.com/watch?time_continue=684&v=IMdPM58guUQ](https://www.youtube.com/watch?time_continue=684&v=IMdPM58guUQ) diff --git a/docs/recipes/query-indexes.md b/docs/recipes/query-indexes.md index 4811504d9..bdf3692d0 100644 --- a/docs/recipes/query-indexes.md +++ b/docs/recipes/query-indexes.md @@ -11,6 +11,7 @@ ] } --> + # Query Indexes Since Lucee 6.0, you can set an index for a query result, which you can then use down the line. @@ -34,4 +35,4 @@ You can then access parts of the query like this: -``` \ No newline at end of file +``` diff --git a/docs/recipes/query-listener.md b/docs/recipes/query-listener.md index 0e870ec3a..063d19cc1 100644 --- a/docs/recipes/query-listener.md +++ b/docs/recipes/query-listener.md @@ -13,6 +13,7 @@ ] } --> + # Query Listeners Since Lucee 6.0, you can define a listener in the Application.cfc to listen to or manipulate every query executed. @@ -58,4 +59,4 @@ component { // Handle exception } } -``` \ No newline at end of file +``` diff --git a/docs/recipes/query-of-queries.md b/docs/recipes/query-of-queries.md index 152df1402..885bfd345 100644 --- a/docs/recipes/query-of-queries.md +++ b/docs/recipes/query-of-queries.md @@ -19,6 +19,7 @@ ] } --> + # 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. This allows you to dynamically combine queries from different databases. @@ -39,8 +40,8 @@ Query of queries (QoQ) is a technique for re-querying an existing (in memory) qu The above example isn't very useful, because `newQry` is a straight copy of the source query, but it demonstrates the two requirements of `QoQ`: -* The dbtype="query" attribute -* A source query object name (e.g., sourceQry) instead of a table name in the FROM clause. +- The dbtype="query" attribute +- A source query object name (e.g., sourceQry) instead of a table name in the FROM clause. ## Example: Filtering @@ -82,36 +83,36 @@ Even though under the hood, Lucee handles the fallback to HSQLDB automatically, **Keywords and Operators** -* <= -* <> -* = -* => -* = -* != -* ALL -* AND -* AS -* BETWEEN x AND y -* DESC/ASC -* DISTINCT -* FROM -* GROUP BY -* HAVING -* IN () -* IS -* IS NOT NULL -* IS NULL -* LIKE -* NOT -* NOT IN () -* NOT LIKE -* OR -* ORDER BY -* SELECT -* TOP -* UNION -* WHERE -* XOR +- <= +- <> +- = +- => +- = +- != +- ALL +- AND +- AS +- BETWEEN x AND y +- DESC/ASC +- DISTINCT +- FROM +- GROUP BY +- HAVING +- IN () +- IS +- IS NOT NULL +- IS NULL +- LIKE +- NOT +- NOT IN () +- NOT LIKE +- OR +- ORDER BY +- SELECT +- TOP +- UNION +- WHERE +- XOR Functions @@ -123,4 +124,4 @@ This is the fallback for when Lucee's SQL implementation can't handle the QoQ sy ## Footnotes -Lucee Google Groups Post: SQL syntax supported by query-of-queries? \ No newline at end of file +Lucee Google Groups Post: SQL syntax supported by query-of-queries? diff --git a/docs/recipes/query-of-query-sometime.md b/docs/recipes/query-of-query-sometime.md index 7c8c87dce..dc3c46430 100644 --- a/docs/recipes/query-of-query-sometime.md +++ b/docs/recipes/query-of-query-sometime.md @@ -21,6 +21,7 @@ ] } --> + # 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. @@ -48,7 +49,7 @@ If the native QoQ engine fails on a single table query, by default, Lucee will a See `LUCEE_QOQ_HSQLDB_DISABLE` and `LUCEE_QOQ_HSQLDB_DEBUG` under [[running-lucee-system-properties]]. -## Example: +## Example: ```lucee+trycf @@ -120,14 +121,14 @@ dump("Query Filter/Sort Execution Time:"&(getTickCount("micro")-start)); In this example, we have two different methods of queries. -1) First one is QoQ. Here, `QoQ` from the `persons` table is executed a thousand times due to the looping required by QoQ. +1. First one is QoQ. Here, `QoQ` from the `persons` table is executed a thousand times due to the looping required by QoQ. -2) The second one is calling the function query filter. Query filter filters out the same row the same way the QoQ does. +2. The second one is calling the function query filter. Query filter filters out the same row the same way the QoQ does. -3) Execute it in the browser and we get two results (Query of Query execution time and Query filter/sort execution time). Query filter executes at least twice as fast as query of query. Because QoQ loops over and over again, it is slower. If you can avoid QoQ and use the Query filter/sort, your code will execute much faster. +3. Execute it in the browser and we get two results (Query of Query execution time and Query filter/sort execution time). Query filter executes at least twice as fast as query of query. Because QoQ loops over and over again, it is slower. If you can avoid QoQ and use the Query filter/sort, your code will execute much faster. ## Footnotes You can see these details in the video here: -[Query of Query Sucks](https://www.youtube.com/watch?v=bUBXzo1WbSM) \ No newline at end of file +[Query of Query Sucks](https://www.youtube.com/watch?v=bUBXzo1WbSM) diff --git a/docs/recipes/query-return-type.md b/docs/recipes/query-return-type.md index a20f9732e..e0523e5c0 100644 --- a/docs/recipes/query-return-type.md +++ b/docs/recipes/query-return-type.md @@ -15,6 +15,7 @@ ] } --> + # Query return type This document explains the different return types for a query with some examples. @@ -70,9 +71,9 @@ query name="sct" datasource="test" returntype="struct" columnKey="lastname" { dump(sct); ``` -1) In this case you have to define which column is the key of the struct. Here I simply use the last name as the key of the struct. +1. In this case you have to define which column is the key of the struct. Here I simply use the last name as the key of the struct. -2) Execute it in the browser, and we get a struct as a result and the key is the last name. So you can directly choose one of these elements by writing the lastname. +2. Execute it in the browser, and we get a struct as a result and the key is the last name. So you can directly choose one of these elements by writing the lastname. ## Example 4: @@ -94,12 +95,12 @@ loop query=qryPerson { } ``` -1) In this example we have two tables. We make a query to the `person` table. Notice that some fields are foreign key references too. We store `sex_id` in the application scope because we use this in the second query. In this, `sex_id` is the key of that struct, so we can simply address it in `"(&application.sex[qryPerson.sex_id].name&")"` this way. +1. In this example we have two tables. We make a query to the `person` table. Notice that some fields are foreign key references too. We store `sex_id` in the application scope because we use this in the second query. In this, `sex_id` is the key of that struct, so we can simply address it in `"(&application.sex[qryPerson.sex_id].name&")"` this way. -2) Execute this example in the browser and we get a result from the other table that is referenced by a foreign key. +2. Execute this example in the browser and we get a result from the other table that is referenced by a foreign key. ## Footnotes You can see these details in the video here: -[Query return type](https://www.youtube.com/watch?v=b9YHhnAuNiw) \ No newline at end of file +[Query return type](https://www.youtube.com/watch?v=b9YHhnAuNiw) diff --git a/docs/recipes/read-xml-with-a-listener-model-sax.md b/docs/recipes/read-xml-with-a-listener-model-sax.md index a40bd4088..8817e5371 100644 --- a/docs/recipes/read-xml-with-a-listener-model-sax.md +++ b/docs/recipes/read-xml-with-a-listener-model-sax.md @@ -14,6 +14,7 @@ ] } --> + # 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). @@ -144,4 +145,4 @@ Now we simply can invoke that component to parse the XML file and get the result ``` -You can download the complete example [here](https://bitbucket.org/lucee/lucee/downloads/lucee-sax-example.zip). \ No newline at end of file +You can download the complete example [here](https://bitbucket.org/lucee/lucee/downloads/lucee-sax-example.zip). diff --git a/docs/recipes/request-timeout.md b/docs/recipes/request-timeout.md index e1ce2c02c..19cd0eef2 100644 --- a/docs/recipes/request-timeout.md +++ b/docs/recipes/request-timeout.md @@ -24,9 +24,11 @@ Lucee allows you to define a request timeout for every request made to Lucee. ** ## Setting Request Timeout ### Lucee Administrator + You can set the request timeout in the Lucee Administrator under "Settings/Request". ### Application.cfc + You can also set the request timeout in the `Application.cfc` as follows: ```luceescript @@ -34,6 +36,7 @@ this.requestTimeout = createTimeSpan(0, 0, 0, 49); ``` ### Tag cfsetting + Alternatively, you can set the request timeout using the `` tag: ```luceetag @@ -45,37 +48,49 @@ Alternatively, you can set the request timeout using the `` tag: Lucee includes several additional thresholds that requests must meet before they are terminated due to a timeout. These thresholds help prevent unnecessary termination of requests, which can pose risks such as deadlocks and open monitors. If a request timeout is reached but the thresholds are not met, Lucee will log the event in the "requesttimeout" log instead of terminating the request. ### Concurrent Requests Threshold -This setting allows you to specify the number of concurrent requests Lucee can handle before enforcing request timeouts. Adjusting this threshold can help manage request timeouts under varying loads. A higher threshold allows more concurrent requests to be processed without enforcing timeouts, potentially improving performance under heavy loads at the risk of longer request times. The default threshold is set to 0, meaning request timeouts are enforced immediately for all requests. + +This setting allows you to specify the number of concurrent requests Lucee can handle before enforcing request timeouts. Adjusting this threshold can help manage request timeouts under varying loads. A higher threshold allows more concurrent requests to be processed without enforcing timeouts, potentially improving performance under heavy loads at the risk of longer request times. The default threshold is set to 0, meaning request timeouts are enforced immediately for all requests. Set this threshold via the System Property: + ```sh -Dlucee.requesttimeout.concurrentrequestthreshold=100 ``` + or the Environment Variable: + ```sh LUCEE_REQUESTTIMEOUT_CONCURRENTREQUESTTHRESHOLD=100 ``` ### CPU Usage Threshold + This option allows you to set a CPU usage threshold that Lucee monitors before enforcing request timeouts. The threshold value is a float ranging from 0.0 (0% CPU usage) to 1.0 (100% CPU usage). When the system's CPU usage is below this threshold, Lucee processes requests without applying the request timeout rule. This helps manage resource allocation and maintain application responsiveness during high demand or limited system resources. The default setting is 0.0, which means request timeouts are applied regardless of CPU usage. Set this threshold via the System Property: + ```sh -Dlucee.requesttimeout.cputhreshold=0.9 ``` + or the Environment Variable: + ```sh LUCEE_REQUESTTIMEOUT_CPUTHRESHOLD=0.9 ``` ### Memory Usage Threshold + This setting allows you to establish a memory usage threshold, guiding Lucee on when to enforce request timeouts based on current memory consumption. The threshold value is a float from 0.0 (0% memory usage) to 1.0 (100% memory usage). By monitoring memory usage against this threshold, Lucee decides whether to enforce or relax request timeouts dynamically. This prevents system overloads and ensures stable performance by not strictly applying timeouts when memory usage is below the defined threshold. The default threshold is set to 0.0, meaning Lucee will apply request timeouts without considering memory usage. Set this threshold via the System Property: + ```sh -Dlucee.requesttimeout.memorythreshold=0.8 ``` + or the Environment Variable: + ```sh LUCEE_REQUESTTIMEOUT_MEMORYTHRESHOLD=0.8 ``` diff --git a/docs/recipes/retry.md b/docs/recipes/retry.md index 601815c1f..88ab2376f 100644 --- a/docs/recipes/retry.md +++ b/docs/recipes/retry.md @@ -16,6 +16,7 @@ ] } --> + # Retry This document explains how to use retry functionality with some simple examples. @@ -73,4 +74,4 @@ We do not get an exception because if the file does not exist, we call retry (re Here you can see these details in the video also: -[Retry](https://youtu.be/zA9aAAimkk8) \ No newline at end of file +[Retry](https://youtu.be/zA9aAAimkk8) diff --git a/docs/recipes/script-templates.md b/docs/recipes/script-templates.md index 02ce7941a..65d0db24e 100644 --- a/docs/recipes/script-templates.md +++ b/docs/recipes/script-templates.md @@ -12,8 +12,9 @@ ] } --> + # Script Templates Since version 6.0, Lucee supports templates with the extension `.cfs`. The idea of these templates is that they contain script code, similar to `.js` files in the JavaScript world. -This allows you to write direct script code without the need for the `` tag. \ No newline at end of file +This allows you to write direct script code without the need for the `` tag. diff --git a/docs/recipes/startup-listeners-code.md b/docs/recipes/startup-listeners-code.md index b8838b87a..db3c76145 100644 --- a/docs/recipes/startup-listeners-code.md +++ b/docs/recipes/startup-listeners-code.md @@ -20,6 +20,7 @@ ] } --> + # Startup Listeners, server.cfc and web.cfc Lucee has two kinds of startup listeners. @@ -55,8 +56,8 @@ component{ } ``` -- Here, Server.cfc has one function ``onServerStart()`` -- Start Lucee Server. +- Here, Server.cfc has one function `onServerStart()` +- Start Lucee Server. - The server console or `out.log` should show the above systemOutput's which means it has run the `Server.cfc` ## Web.cfc @@ -87,11 +88,11 @@ component { } ``` -Here `Web.cfc` has one function ``onWebStart()`` and one argument ``reload`` that indicates if the web context is a new startup of the server. +Here `Web.cfc` has one function `onWebStart()` and one argument `reload` that indicates if the web context is a new startup of the server. -Here ``reload`` is used to reload the web context. We see the difference when setting reload to true or false. +Here `reload` is used to reload the web context. We see the difference when setting reload to true or false. -- Start your Lucee server. +- Start your Lucee server. - Here we see the server context output first, then the web context output next. So you can see that both listeners get triggered by Lucee. - Next, change the **settings --> charset** for web charset "UTF-8" in web admin. - After setting the charset in web admin, the web context only is reloaded and we do not have the server context. So this feature is used to stop/prevent any difficulties with the server context. @@ -102,4 +103,4 @@ This is a simple way to stop the server context. It is never triggered because t Here you can see above details in video -[Lucee Startup Listeners](https://youtu.be/b1MWLwkKdLE) \ No newline at end of file +[Lucee Startup Listeners](https://youtu.be/b1MWLwkKdLE) diff --git a/docs/recipes/static-scope-in-components.md b/docs/recipes/static-scope-in-components.md index 9f215ab3f..8029d1b6d 100644 --- a/docs/recipes/static-scope-in-components.md +++ b/docs/recipes/static-scope-in-components.md @@ -18,6 +18,7 @@ ] } --> + # Static scope in components Static scope in components is needed to create an instance of cfc and call its method. It is used to avoid creating an instance each time you use the cfc. @@ -36,7 +37,7 @@ loop query=dir { } ``` -1) Create a constructor of the component. It is the instance of the current path and also create new function hey(). +1. Create a constructor of the component. It is the instance of the current path and also create new function hey(). ```luceescript // Example0.cfc @@ -50,7 +51,7 @@ Component { } ``` -2) Next, we instantiate the component four times, and then call the hey() function. Run this example00.cfm page in the browser. It shows five dumps. Four dumps coming from inside of the constructor and the fifth dump is from hey(). Note that the init() function is private, so you cannot load it from outside the component. Therefore, you have no access to the message within init() from the cfscript in the example below. +2. Next, we instantiate the component four times, and then call the hey() function. Run this example00.cfm page in the browser. It shows five dumps. Four dumps coming from inside of the constructor and the fifth dump is from hey(). Note that the init() function is private, so you cannot load it from outside the component. Therefore, you have no access to the message within init() from the cfscript in the example below. ```luceescript // example0.cfm @@ -65,7 +66,7 @@ cfc.hey(); As our code gets more complicated, we need to make some additions to it. -* One option is to create the Component in the application scope or server scope, or to use the function GetComponentMetaData to store components in a more persistent manner. +- One option is to create the Component in the application scope or server scope, or to use the function GetComponentMetaData to store components in a more persistent manner. The static scope for components was introduced in Lucee 5.0. This is a scope that is shared with all instances of the same component. @@ -87,7 +88,7 @@ Component { Here, the variable `counter` is defined in the static scope. This means that all instances of Example1.cfc share this variable. -2) In the following example, we call the Example1() function three times. Each time, the `counter` variable is incremented and shared across all instances. +2. In the following example, we call the Example1() function three times. Each time, the `counter` variable is incremented and shared across all instances. ```luceescript // example1.cfm @@ -98,7 +99,7 @@ new Example1(); ## Example 3 -1) Another example is using the static scope to store the result of a time-consuming operation that does not need to be recomputed every time. +1. Another example is using the static scope to store the result of a time-consuming operation that does not need to be recomputed every time. ```luceescript // Example2.cfc @@ -117,7 +118,7 @@ Component { Here, the array `data` is defined in the static scope, which means it will be computed only once and shared across all instances. -2) In the following example, we call the Example2() function twice. The array `data` is computed only once and reused in the second instance. +2. In the following example, we call the Example2() function twice. The array `data` is computed only once and reused in the second instance. ```luceescript // example2.cfm @@ -127,7 +128,7 @@ new Example2(); ## Example 4 -1) The static scope can also be used for functions. In this example, we define a static function that is available to all instances. +1. The static scope can also be used for functions. In this example, we define a static function that is available to all instances. ```luceescript // Example3.cfc @@ -138,7 +139,7 @@ Component { } ``` -2) In the following example, we call the static function `hello` without creating an instance of Example3. +2. In the following example, we call the static function `hello` without creating an instance of Example3. ```luceescript // example3.cfm @@ -147,7 +148,7 @@ dump(Example3::hello()); ## Example 5 -1) The static scope can be used to count the number of instances created from a component. +1. The static scope can be used to count the number of instances created from a component. ```luceescript // Example4.cfc @@ -160,7 +161,7 @@ Component { } ``` -2) In the following example, we call the Example4() function five times. Each time the function is called, the count of `counter` in the static scope increases. +2. In the following example, we call the Example4() function five times. Each time the function is called, the count of `counter` in the static scope increases. ```luceescript // example4.cfm @@ -173,10 +174,10 @@ new Example4(); ## Example 6 -1) We can also use the static scope to store constant data like HOST, PORT. +1. We can also use the static scope to store constant data like HOST, PORT. -* If we store the instance in the variable scope, you will run into problems when you have a thousand components or it gets loaded a thousand times. This is a waste of time and memory storage. -* The static scope means that a variable only exists once and is independent of how many instances you have. So it is more memory efficient to do it that way. You can also do the same for functions. +- If we store the instance in the variable scope, you will run into problems when you have a thousand components or it gets loaded a thousand times. This is a waste of time and memory storage. +- The static scope means that a variable only exists once and is independent of how many instances you have. So it is more memory efficient to do it that way. You can also do the same for functions. ```luceescript // Example5.cfc @@ -198,7 +199,7 @@ Component { } ``` -2) In the following example, we call the Example5() function in two ways. It has a function splitFullName() that does not need to access anything (read or write data from the disks) and a variable scope that doesn't have to be part of the instance. It returns the firstname and lastname. +2. In the following example, we call the Example5() function in two ways. It has a function splitFullName() that does not need to access anything (read or write data from the disks) and a variable scope that doesn't have to be part of the instance. It returns the firstname and lastname. ```luceescript // example5.cfm @@ -211,4 +212,4 @@ dump(Example5::splitFullName("Quintana Jesus")); [Lucee 5 features reviewed: static](https://dev.lucee.org/t/lucee-5-features-reviewed-static/433) -[Video: Lucee Static Scopes in Component Code](https://www.youtube.com/watch?v=B5ILIAbXBzo&feature=youtu.be) \ No newline at end of file +[Video: Lucee Static Scopes in Component Code](https://www.youtube.com/watch?v=B5ILIAbXBzo&feature=youtu.be) diff --git a/docs/recipes/sub-components.md b/docs/recipes/sub-components.md index 57295bef6..79580c067 100644 --- a/docs/recipes/sub-components.md +++ b/docs/recipes/sub-components.md @@ -12,6 +12,7 @@ ] } --> + # Sub Component Since Lucee 6.0, Lucee allows you to create sub components. These are additional components created in a .cfc after the main component. @@ -24,7 +25,7 @@ component { return "main"; } } -component name="Sub" { +component name="Sub" { function subTest() { return "sub"; } @@ -42,4 +43,4 @@ echo("
"); cfc = new MyCFC$Sub(); echo("sub->" & cfc.subTest()); echo("
"); -``` \ No newline at end of file +``` diff --git a/docs/recipes/supercharge-your-website.md b/docs/recipes/supercharge-your-website.md index f8c5d2627..eaa8d2d32 100644 --- a/docs/recipes/supercharge-your-website.md +++ b/docs/recipes/supercharge-your-website.md @@ -12,6 +12,7 @@ ] } --> + # Supercharge your website This document explains how you can improve the performance of your website in a very short time with Lucee. @@ -27,18 +28,18 @@ Run the above index.cfm, and you get a timestamp. Whenever we call our file, Luc ## Using Admin -* Go to _Admin -> Performance/ Caching -> Inspect Templates (CFM/CFC) -> Never_ +- Go to _Admin -> Performance/ Caching -> Inspect Templates (CFM/CFC) -> Never_ -* The default is "Once", checking any requested files one time within each request. You should check "Never" to avoid the checking at every request. +- The default is "Once", checking any requested files one time within each request. You should check "Never" to avoid the checking at every request. -* Change the index.cfm and run it again. No changes happen in the output because Lucee does not check if the file changed or not. Now, let's see the faster execution and less performance memory being used. +- Change the index.cfm and run it again. No changes happen in the output because Lucee does not check if the file changed or not. Now, let's see the faster execution and less performance memory being used. -* You can clear the cache by code using `pagePoolClear()`. This clears all template cache so that Lucee will check again if the template has changed. On the next request, Lucee will check initially for the file. +- You can clear the cache by code using `pagePoolClear()`. This clears all template cache so that Lucee will check again if the template has changed. On the next request, Lucee will check initially for the file. -* Another option to clear the template cache is to use clear cache via the admin by clicking the button in _Admin -> Settings -> Performance/ Caching -> Page Pool Cache_. +- Another option to clear the template cache is to use clear cache via the admin by clicking the button in _Admin -> Settings -> Performance/ Caching -> Page Pool Cache_. ## Footnotes Here you can see these details on video also: -[Charge Your Website](https://youtu.be/w-eeigEkmn0) \ No newline at end of file +[Charge Your Website](https://youtu.be/w-eeigEkmn0) diff --git a/docs/recipes/thread-task.md b/docs/recipes/thread-task.md index 6c68ddb56..34dda69dd 100644 --- a/docs/recipes/thread-task.md +++ b/docs/recipes/thread-task.md @@ -18,6 +18,7 @@ ] } --> + # Thread Task This document explains about the thread tasks. It is useful to know the differences between regular threads and task threads. @@ -26,11 +27,11 @@ When a regular thread throws an exception, the default exception type is `type=' Regular Threads have the following characteristics: -1) **Bound to current request**: With the help of CFThread you can always see what the thread is doing. With `action='join'` you can wait until the thread ends and join it. You can also call `action='terminate'` and end the thread. You always have control over the thread with the various actions. +1. **Bound to current request**: With the help of CFThread you can always see what the thread is doing. With `action='join'` you can wait until the thread ends and join it. You can also call `action='terminate'` and end the thread. You always have control over the thread with the various actions. -2) **Runs only once**: The thread runs only once. It ends at the end of the Cfthread tag or if there is an exception. +2. **Runs only once**: The thread runs only once. It ends at the end of the Cfthread tag or if there is an exception. -3) **It fails when it fails**: There is no special exception handling so when the thread fails it fails unless you have Cftry, cfcatch inside the thread and you have exception handling there. +3. **It fails when it fails**: There is no special exception handling so when the thread fails it fails unless you have Cftry, cfcatch inside the thread and you have exception handling there. ## Example 1 @@ -109,13 +110,13 @@ admin.removeTask(tasks.id[tasks.recordcount]); admin.removeAllTask(); ``` -1) `admin.getTasks()` is used to list out all existing tasks. When executed, it returns a query that contains the information from the task. +1. `admin.getTasks()` is used to list out all existing tasks. When executed, it returns a query that contains the information from the task. -2) `admin.executeTask()` is used to execute the task and we see it in the browser. It throws an exception. +2. `admin.executeTask()` is used to execute the task and we see it in the browser. It throws an exception. -3) `admin.removeTask()` and `admin.removeAllTask()` are used to remove tasks from the administrator. +3. `admin.removeTask()` and `admin.removeAllTask()` are used to remove tasks from the administrator. ## Footnotes Here you can see the details in the video: -[Thread Task](https://youtu.be/-SUbVWqJRME) \ No newline at end of file +[Thread Task](https://youtu.be/-SUbVWqJRME) diff --git a/docs/recipes/thread-usage.md b/docs/recipes/thread-usage.md index 8425d36b2..7b022c282 100644 --- a/docs/recipes/thread-usage.md +++ b/docs/recipes/thread-usage.md @@ -16,6 +16,7 @@ ] } --> + # Thread Usage This document explains how to use threads in Lucee. Threads are mainly used for executing code in parallel. @@ -189,4 +190,4 @@ Another planned enhancement is to extend parallel to the loop by simply adding ` Here you can see the above details in a video: -[Lucee Threads](https://www.youtube.com/watch?v=oGUZRrcg9KE) \ No newline at end of file +[Lucee Threads](https://www.youtube.com/watch?v=oGUZRrcg9KE) diff --git a/docs/recipes/timeout.md b/docs/recipes/timeout.md index 257f14e72..84ff2c698 100644 --- a/docs/recipes/timeout.md +++ b/docs/recipes/timeout.md @@ -13,6 +13,7 @@ ] } --> + # Timeout Since version 6.0, Lucee supports the tag ``. This tag allows you to define a timeout specific to a code block. @@ -36,14 +37,14 @@ You define how long the code within the tag is allowed to run and a listener (cl You can also add an additional listener `onError` that is called in case an exception occurs within the timeout block. If you want to escalate the exception, you simply rethrow the exception like in the following example: ```lucee - -``` \ No newline at end of file +``` diff --git a/docs/recipes/types-in-lucee.md b/docs/recipes/types-in-lucee.md index 270671441..5ed27f9c5 100644 --- a/docs/recipes/types-in-lucee.md +++ b/docs/recipes/types-in-lucee.md @@ -12,6 +12,7 @@ ] } --> + # 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. The language is not based on types, however there are different places where types come into Lucee. This is explained with some simple examples below: @@ -40,10 +41,10 @@ For functions, the return value is returned with the specific type that was defi dump(arr); ``` -* This example function has two arguments: name, age (One is a string, the other is a number). When this example is executed, the recExists() function checks if a certain record exists or not and It returns the boolean value `true`. -* When dumping the function recExists() with arguments, if we give age as a string format in the argument, `dump(recExists("Susi","15"))`, it shows `string 15` even though we defined it as a number data type in the arguments. -* The test() function takes an array, but in this example I do not pass an array into the function. I have passed a struct `arr={'1':'one'}` value into the test() function. The test() function contains an array value `arr[2]= "two"`, so Lucee converts this array value into a structure. So the struct has two values as per keys are 1, 2 and values are one, two. -* Lucee can handle an array as long as the keys are all numbers, meaning it considers a struct `'1' and [2]`. Execute this cfm page, the dump shows the structure format. +- This example function has two arguments: name, age (One is a string, the other is a number). When this example is executed, the recExists() function checks if a certain record exists or not and It returns the boolean value `true`. +- When dumping the function recExists() with arguments, if we give age as a string format in the argument, `dump(recExists("Susi","15"))`, it shows `string 15` even though we defined it as a number data type in the arguments. +- The test() function takes an array, but in this example I do not pass an array into the function. I have passed a struct `arr={'1':'one'}` value into the test() function. The test() function contains an array value `arr[2]= "two"`, so Lucee converts this array value into a structure. So the struct has two values as per keys are 1, 2 and values are one, two. +- Lucee can handle an array as long as the keys are all numbers, meaning it considers a struct `'1' and [2]`. Execute this cfm page, the dump shows the structure format. ### Example 2 : CFParam @@ -74,10 +75,10 @@ dump(url); dump(sb); ``` -* Internally every object has a type and Lucee automatically takes care of converting from one type to another if necessary. For example when you define a function with a string, but then pass a number into that function, Lucee automatically converts the number to a string. -* The above example is useful for converting "string to date", "date to number", "number to date" formats. -* We have loaded a Java library and string builder. We pass a string into a constructor and execute this. We see that the string builder contains that value. We refer to this `string builder` method in the Java Doc. The method is called `substring`. This substring takes an int as its argument. For example, we pass a string value instead of an int value `sb.substring("5")`. Lucee returns a substring properly. -* Two constructors are available for string builder. There are `StringBuilder(int), StringBuilder(string)`. +- Internally every object has a type and Lucee automatically takes care of converting from one type to another if necessary. For example when you define a function with a string, but then pass a number into that function, Lucee automatically converts the number to a string. +- The above example is useful for converting "string to date", "date to number", "number to date" formats. +- We have loaded a Java library and string builder. We pass a string into a constructor and execute this. We see that the string builder contains that value. We refer to this `string builder` method in the Java Doc. The method is called `substring`. This substring takes an int as its argument. For example, we pass a string value instead of an int value `sb.substring("5")`. Lucee returns a substring properly. +- Two constructors are available for string builder. There are `StringBuilder(int), StringBuilder(string)`. ```luceescript @@ -106,4 +107,4 @@ These types are on top of the language. Lucee contains some other different type Here you can see above details in video -[Types of Lucee](https://youtu.be/02kMrN4PByc) \ No newline at end of file +[Types of Lucee](https://youtu.be/02kMrN4PByc) diff --git a/docs/recipes/using-s3-directly-for-source-code.md b/docs/recipes/using-s3-directly-for-source-code.md index 3ade39391..8d215107e 100644 --- a/docs/recipes/using-s3-directly-for-source-code.md +++ b/docs/recipes/using-s3-directly-for-source-code.md @@ -15,6 +15,7 @@ ] } --> + # Using S3 directly for source code This document explains how to use S3 as for your source code and how to use S3 for your artifacts when we look at the source code itself. @@ -37,31 +38,31 @@ component{ } ``` -1) In this example we directly call an S3 resource of the image using `file="s3:///cfml1/lucee.png"` and also define the mime type. Then we see the image while calling it in the browser. +1. In this example we directly call an S3 resource of the image using `file="s3:///cfml1/lucee.png"` and also define the mime type. Then we see the image while calling it in the browser. -2) In this example, we define the credentials of the S3 in the Application.cfc. Here we give dummy data for the accesskey Id and secretkey. +2. In this example, we define the credentials of the S3 in the Application.cfc. Here we give dummy data for the accesskey Id and secretkey. -3) In this example, if you have an exception, it will display on the page exposing your credential information. So, we never use an error template that shows the exception. Best practice is to never use the credential with the password itself. Instead, always defined it in the application.cfc +3. In this example, if you have an exception, it will display on the page exposing your credential information. So, we never use an error template that shows the exception. Best practice is to never use the credential with the password itself. Instead, always defined it in the application.cfc -4) Another option is to map with the admin. +4. Another option is to map with the admin. - - Virtual : /s3 - - Resource : s3://somethingLikeThis@/ + - Virtual : /s3 + - Resource : s3://somethingLikeThis@/ But again, that would expose your credentials for everybody that sees an exception message. -5) Instead, set the credentials in the environment variable or system properties (This is a new feature in S3 0.9.4.118). So, we can remove the resource in the mapping and just simply define `Resource : s3:///cfml1/` and save this mapping. +5. Instead, set the credentials in the environment variable or system properties (This is a new feature in S3 0.9.4.118). So, we can remove the resource in the mapping and just simply define `Resource : s3:///cfml1/` and save this mapping. -6) Two important things in mapping. +6. Two important things in mapping. - * When enabling the flag `Web Accessible`, this exposes that mapping directly to the user. So you can call it at /s3 in the browser. - * When removing the flag `Web Accessible`, you can only include that mapping. So, we always use cfinclude s3. + - When enabling the flag `Web Accessible`, this exposes that mapping directly to the user. So you can call it at /s3 in the browser. + - When removing the flag `Web Accessible`, you can only include that mapping. So, we always use cfinclude s3. -7) If we select `Never` in 'Inspect Templates' this tells Lucee to pick up the file on first request from s3. It will compile the file to a local folder. Then it will only use that local compiled file and never check again if the file has changed. +7. If we select `Never` in 'Inspect Templates' this tells Lucee to pick up the file on first request from s3. It will compile the file to a local folder. Then it will only use that local compiled file and never check again if the file has changed. -8) We go to `localhost:8888/s3/cfml1/index.cfm` in the browser. We get the source from S3 which comes directly from a stream, so we are catching that. It will not pick up any changes at all. For example, if we change that file a little bit and then update the file on s3, and then call it again in the browser, it does not pick up the latest changes. Because it is cached, what you now can do is flush the change with the help of the function `PagePoolClear()`. This function will create a complete page pool. +8. We go to `localhost:8888/s3/cfml1/index.cfm` in the browser. We get the source from S3 which comes directly from a stream, so we are catching that. It will not pick up any changes at all. For example, if we change that file a little bit and then update the file on s3, and then call it again in the browser, it does not pick up the latest changes. Because it is cached, what you now can do is flush the change with the help of the function `PagePoolClear()`. This function will create a complete page pool. -9) Lucee will pick up the file including the new changes when we call and execute again. Here you have cached and flushed the cache manually. If you add new files to the s3, you can automate that step. +9. Lucee will pick up the file including the new changes when we call and execute again. Here you have cached and flushed the cache manually. If you add new files to the s3, you can automate that step. It might be very useful to schedule a task that checks every five minutes or so to see if there are changes in the files on S3, and flush everything is there are changes. @@ -69,4 +70,4 @@ It might be very useful to schedule a task that checks every five minutes or so Here you can also see these details in the video: -[S3 for source code](https://youtu.be/twQomRCbaCY) \ No newline at end of file +[S3 for source code](https://youtu.be/twQomRCbaCY) diff --git a/docs/recipes/virtual-file-system.md b/docs/recipes/virtual-file-system.md index c11e2ef4a..14c1e2393 100644 --- a/docs/recipes/virtual-file-system.md +++ b/docs/recipes/virtual-file-system.md @@ -44,6 +44,7 @@ Lucee uses virtual file systems for all file interactions. Actions like `fileRead(file)` can be done against any filesystem defined. Every virtual filesystem is addressed with a protocol prefix like "http" or "s3". When no protocol prefix is defined, the default "virtual" file system "file" is used, which is the local filesystem (can be changed). Lucee supports the following virtual file systems out of the box: + - file (default) - ftp - http / https @@ -51,6 +52,7 @@ Lucee supports the following virtual file systems out of the box: - zip / tgz / tar Additionally, there are extensions for the following virtual file systems: + - git - S3 @@ -71,10 +73,10 @@ A simple example:
``` -* `getCurrentTemplatePath` returns the current template path. -* `getDirectoryFromPath` returns the directory. -* Pass the file path to `fileRead` to read the content of the file. -* Pass the directory to `directoryList` to list all the directories in the given folder path. +- `getCurrentTemplatePath` returns the current template path. +- `getDirectoryFromPath` returns the directory. +- Pass the file path to `fileRead` to read the content of the file. +- Pass the directory to `directoryList` to list all the directories in the given folder path. However, you can explicitly define the file system you want to use. To use a local file system, use the `file://` prefix. @@ -88,7 +90,7 @@ As seen in the example code above, the local file system is the default, so it i sct.file = "file://" & sct.file; sct.directory = "file://" & sct.directory; - + dump(sct); dump(fileRead(sct.file)); dump(directoryList(sct.directory)); @@ -100,7 +102,7 @@ As seen in the example code above, the local file system is the default, so it i `[file://]` so for example `file:///Users/susi/Projects/local/file.txt` -or simply +or simply `/Users/susi/Projects/local/file.txt` ## FTP File System @@ -112,8 +114,9 @@ You will need access credentials for accessing FTP. Set up an FTP file system us You can define the credentials in the Application.cfc like this Application.cfc + ```lucee -// How to configure default FTP settings via Application.cfc +// How to configure default FTP settings via Application.cfc this.ftp.username = "secretUser"; this.ftp.password = "secretPW"; this.ftp.host = "ftp.lucee.org"; @@ -139,8 +142,9 @@ dump(dir); Or take parts from Application.cfc and define other parts directly like this: Application.cfc + ```lucee -// How to configure default FTP settings via Application.cfc +// How to configure default FTP settings via Application.cfc this.ftp.username = "secretUser"; this.ftp.password = "secretPW"; ``` @@ -162,7 +166,7 @@ so for example ## HTTP/HTTPS Filesystem -This is a read-only filesystem that makes essential `get` and `head` calls to an HTTP server, with limited functionality. Because of the nature of HTML, things like `directoryList("http://...")` are not possible. This file system also does not support credentials or any definition in the Application.cfc. +This is a read-only filesystem that makes essential `get` and `head` calls to an HTTP server, with limited functionality. Because of the nature of HTML, things like `directoryList("http://...")` are not possible. This file system also does not support credentials or any definition in the Application.cfc. ```lucee @@ -178,7 +182,7 @@ so for example ## RAM/Cache File System -RAM is a virtual file system that allows you to treat the memory of the JVM as a file system. +RAM is a virtual file system that allows you to treat the memory of the JVM as a file system. This is useful for storing temporary files, and it is very fast since it uses the system's RAM. This data will be lost when the server restarts (unless you use a cache; see below). The RAM file system is configured with the `ram://` prefix. @@ -194,14 +198,17 @@ dump(directoryList(sct.ram)); ``` ### Cache -In addition, you can define a Cache in the Lucee Administrator or in the Application.cfc that then is used to store the data. + +In addition, you can define a Cache in the Lucee Administrator or in the Application.cfc that then is used to store the data. With this cache, this file system can be distributed across multiple servers and can also survive a restart of the Server. -#### Define a cache in the Admin -In the Lucee Administrator under "Services/Cache" you can define a cache (EHCache, Redis, Couchbase, ...) and then below "Default cache connection", +#### Define a cache in the Admin + +In the Lucee Administrator under "Services/Cache" you can define a cache (EHCache, Redis, Couchbase, ...) and then below "Default cache connection", you define that cache as default for "Resource". -#### Define a cache in the Application.cfc +#### Define a cache in the Application.cfc + In the Application.cfc you simply define the following: ```lucee @@ -217,7 +224,7 @@ so for example ## ZIP/TGZ/TAR File System -Another file system you can use in Lucee is the ZIP/TGZ/TAR file system to access a compressed file like a file system. +Another file system you can use in Lucee is the ZIP/TGZ/TAR file system to access a compressed file like a file system. To tell Lucee to use a compressed file system, use the prefix `zip://`, `tgz://`, or `tar://`. Now the file path will look like `zip://path/to/the/zip/test.zip!/path/inside/the/zip/file.txt`. @@ -240,13 +247,14 @@ so for example Next to the bundled virtual file system, there are other file systems available as extensions you can install when needed. -## Object Storage/S3 File System +## Object Storage/S3 File System -Object Storage/S3 is a remote file system you can use for Amazon S3 storage. +Object Storage/S3 is a remote file system you can use for Amazon S3 storage. ### Support for different providers Lucee not only supports access to Amazon S3 cloud storage, it also allows using the same file system to access other Object storage providers: + - Amazon S3 - Cloud Storage - MinIO - Open-source Object Storage - Wasabi - Cloud Storage @@ -262,7 +270,7 @@ Lucee not only supports access to Amazon S3 cloud storage, it also allows using - Dell EMC ECS - Enterprise Object Storage - Cloudian HyperStore - Object Storage - OpenIO - Open-source Object Storage -- NetApp StorageGRID - Object Storage Solution +- NetApp StorageGRID - Object Storage Solution Traditionally only Amazon S3 Cloud Storage was supported, because of that the prefix `s3://` is used. @@ -275,6 +283,7 @@ The credentials needed to access can be provided in various ways. You can define the credentials with the help of Environment Variables/System Properties. In that case, only a single set of credentials is possible. These are the possible settings: Environment Variables + ```sh LUCEE_S3_ACCESSKEYID: AKIAIOSFODNN7EXAMPLE LUCEE_S3_SECRETACCESSKEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY @@ -285,6 +294,7 @@ LUCEE_S3_ACL: public-read ``` System Properties + ```sh -Dlucee.s3.accesskeyid: AKIAIOSFODNN7EXAMPLE -Dlucee.s3.secretaccesskey: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY @@ -309,7 +319,7 @@ this.s3.acl = "public-read"; But you can also do multiple entries and give everyone a name. -```lucee +```lucee // my wasabi this.vfs.s3.mywasabi.accessKeyId = "AKIAIOSFODNN7EXAMPLE"; this.vfs.s3.mywasabi.secretKey = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"; @@ -321,6 +331,7 @@ this.vfs.s3.myaws.secretKey = "sdszhHJNkliomi/K7MDENG/bPxRfiCYEXAMPLEKEY"; ``` In the code, they can be used like this: + ```lucee dir = directoryList("s3://mywasabi@/path/inside/wasabi.txt"); dump(dir); @@ -338,12 +349,14 @@ dump(dir); ``` In case you have defined it in the Application.cfc with the help of `this.vfs.s3` with a name, you can use it like this: + ```lucee dir = directoryList("s3://mywasabi@/mybucketName/myObjectFolder/myObject.txt"); dump(dir); ``` Or if you want to pass all data into the path, it would look like this: + ```lucee dir = directoryList("s3://AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY@s3.eu-central-1.wasabisys.com/mybucketName/myObjectFolder/myObject.txt"); dump(dir); @@ -355,7 +368,7 @@ dump(dir); so for example: `s3://AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY@s3.eu-central-1.wasabisys.com/mybucketName/myObjectFolder/myObject.txt` -## GIT File System +## GIT File System GIT is a virtual filesystem that allows you to access GitHub like a filesystem, so you can, for example, map your webroot directly to a GitHub repository. The extension caches the files locally for faster access and recognizes any changes made on GitHub. @@ -368,12 +381,14 @@ The credentials needed to access a private repository can be provided in differe You can define the credentials with the help of Environment Variables/System Properties. In that case, only a single set of credentials is possible. These are the possible settings: Environment Variables + ```sh LUCEE_GIT_USERNAME: whatever LUCEE_GIT_PASSWORD: qwerty ``` System Properties + ```sh -Dlucee.git.username: whatever -Dlucee.git.password: qwerty @@ -383,7 +398,7 @@ System Properties You can define the credentials in the Application.cfc like the following. Additionally, you can define the name and branch of the repository you want to access. -```lucee +```lucee this.git.username = "whatever"; this.git.password = "qwerty"; this.git.repository = "lucee-examples"; @@ -391,12 +406,14 @@ this.git.branch = "master"; ``` In the code, this can be used as follows when you have defined everything in the environment (for example, Application.cfc). + ```lucee dir = directoryList("git:///path/inside/git"); dump(dir); ``` It is not possible to define the credentials as part of the path (for security reasons), but you can define "branch" and "repository" in the path like this: + ```lucee dir = directoryList("git://master@/path/inside/git!lucee-examples"); dump(dir); @@ -412,4 +429,4 @@ so for example: Here you can see the above details in a video: -[Lucee virtual File System](https://www.youtube.com/watch?time_continue=693&v=AzUNVYrbWiQ) \ No newline at end of file +[Lucee virtual File System](https://www.youtube.com/watch?time_continue=693&v=AzUNVYrbWiQ) diff --git a/docs/recipes/websocket-extension.md b/docs/recipes/websocket-extension.md index e0733fb41..c806f6bbe 100644 --- a/docs/recipes/websocket-extension.md +++ b/docs/recipes/websocket-extension.md @@ -12,6 +12,7 @@ ] } --> + # WebSocket Extension This extension adds a WebSocket Server to your Lucee Server that runs over `TCP` on port 80 for `WS:` and 443 for `WSS:` @@ -22,9 +23,9 @@ WebSocket Listeners are created with a CFML Component - one per channel. There are multiple ways to install the docker extension. -### Lucee Administor +### Lucee Administrator -The Extension can be installed via Lucee Administor +The Extension can be installed via Lucee Administrator ![Lucee Admin: Extensions - Application](https://raw.githubusercontent.com/lucee/lucee-docs/master/docs/_images/extension/websocket/lucee-admin-extension.png) @@ -39,28 +40,32 @@ Download the LEX file from [https://download.lucee.org/](https://download.lucee. In docker there are different ways to install it. Copy it into the `deploy folder` like this: + ```Dockerfile ADD https://ext.lucee.org/org.lucee.websocket.extension-1.0.0.4-BETA.lex /lucee/lucee-server/deploy/ ``` Use Environment Variables like this: + ```yml environment: - - LUCEE_EXTENSIONS=07082C66-510A-4F0B-B5E63814E2FDF7BE;version=1.0.0.4-BETA + - LUCEE_EXTENSIONS=07082C66-510A-4F0B-B5E63814E2FDF7BE;version=1.0.0.4-BETA ``` Or simply define it in the .CFConfig.json file (Lucee 6 only) + ```json { - "extensions": [ - { - "name": "WebSocket", - "path": "/your/path/extensions/websocket.extension-1.0.0.4-BETA.lex", - "id": "07082C66-510A-4F0B-B5E63814E2FDF7BE" - } - ] + "extensions": [ + { + "name": "WebSocket", + "path": "/your/path/extensions/websocket.extension-1.0.0.4-BETA.lex", + "id": "07082C66-510A-4F0B-B5E63814E2FDF7BE" + } + ] } ``` + See [this](https://github.com/lucee/lucee-docs/tree/master/examples/docker/with-extension) example for more details about setting up Extension in .CFConfig.json. ## Configuration @@ -69,13 +74,13 @@ By default, Lucee Server will look in `{lucee-config}/websockets/` for WebSocket Lucee Server will create a config file if one does not exists at `{lucee-config}websocket.json` with the following defaults -*{lucee-config}: /lucee/lucee-server/context* +_{lucee-config}: /lucee/lucee-server/context_ ```json { - "directory":"{lucee-config}/websockets/", - "requestTimeout":50, - "idleTimeout":300 + "directory": "{lucee-config}/websockets/", + "requestTimeout": 50, + "idleTimeout": 300 } ``` @@ -85,14 +90,15 @@ The WebSocket Extension comes with a helper function `websocketInfo()` that well TODO: update with new version ## Component ->[!IMPORTANT] ->a Lucee restart is required when a new WebSocket CFC is added (just like for a ReST CFC) + +> [!IMPORTANT] +> a Lucee restart is required when a new WebSocket CFC is added (just like for a ReST CFC) ```lucee component hint="used to test websocket client" { public static function onFirstOpen(wsclients) {} - + function onOpen(wsclient) {} function onOpenAsync(wsclient) {} @@ -115,16 +121,16 @@ Given that the Component was saved as `{lucee-config}/websockets/test.cfc`, here ```javascript socket = new WebSocket("ws://127.0.0.1:80/ws/test"); -socket.onopen = function(evt) { - console.log(['onopen()', evt]); +socket.onopen = function (evt) { + console.log(["onopen()", evt]); }; socket.onmessage = (event) => { - console.log(event.data); + console.log(event.data); }; -socket.onerror = function(error) { - console.error(error); +socket.onerror = function (error) { + console.error(error); }; socket.send("Hello, Lucee Extension!"); @@ -133,6 +139,7 @@ socketclose(); ``` ### Broadcast Message to all Clients + A broadcast is a message send to all connected clients To be able to do this, we need to know who is connected. The first time a connection is made, `onFirstOpen(wsclients)` is fired. `wsclients` is a Java class with the following methods @@ -153,9 +160,10 @@ public static function onFirstOpen(wsclients) { ``` For example + ```lucee function onOpen(wsclient) { - static.wsclients.broadcast("There are now ##static.wsclients.size()## connections"); + static.wsclients.broadcast("There are now ##static.wsclients.size()## connections"); } ``` @@ -175,7 +183,7 @@ To send a message using wsclient ```lucee function onOpen(wsclient) { - arguments.wsclient.send("You are connected to Lucee WebSocket"); + arguments.wsclient.send("You are connected to Lucee WebSocket"); } ``` @@ -183,11 +191,11 @@ You can also send a message from `onOpen()` by returning a string ```lucee function onOpen(wsclient) { - return "Welcome to the test websocket channel"; + return "Welcome to the test websocket channel"; } ``` -You can add your own function to the WebSocket Componet +You can add your own function to the WebSocket Component ```lucee public void function sendMessage( @@ -197,14 +205,15 @@ public void function sendMessage( } function onOpen(wsclient) { - sendMessage("Hello, Lucee WebSocket!"); + sendMessage("Hello, Lucee WebSocket!"); } ``` ## Using Lucee WebSocket to PUSH data to Client -With webSocets being a bidirectional communication channel, your Lucee Server no longer limited to responding to a *request*, it can now *push* data to the client. -This means the user no longer has to refresh a page to see if data is updated, or have a Javascript looping function that is continuosly calling a ReST API to get lasted data. +With webSocets being a bidirectional communication channel, your Lucee Server no longer limited to responding to a _request_, it can now _push_ data to the client. + +This means the user no longer has to refresh a page to see if data is updated, or have a Javascript looping function that is continuously calling a ReST API to get lasted data. When your application has data ready for the user, have the WebSocket push the data to the cient! @@ -231,7 +240,7 @@ Function `getDataFromSomewhere()` is respoible for obtaining the data that needs `websocketInfo()` also has an array of instances - one for each client call to a WebSocket Component. So looping through the array, gives you access to the Component, and then you can call any of it'sfunction -For Example ( *excuding role management functions* ) +For Example ( _excuding role management functions_ ) ```lucee component hint="Test WebSocket" { @@ -254,7 +263,7 @@ component hint="Test WebSocket" { ```lucee var wsInfo = websocketInfo(false); -if ( !wsInfo.instances.len() ) +if ( !wsInfo.instances.len() ) return; var wsInstances = wsInfo.instances; @@ -267,6 +276,7 @@ for ( var wsI in wsInstances) { } } ``` + [Task Event Gateway](event-gateways-overview.md) is a good candidate for this script -*TODO: link to recipe page* +_TODO: link to recipe page_ diff --git a/docs/recipes/xml-fast-and-easy.md b/docs/recipes/xml-fast-and-easy.md index 23ad52dbb..be29e5dc1 100644 --- a/docs/recipes/xml-fast-and-easy.md +++ b/docs/recipes/xml-fast-and-easy.md @@ -18,6 +18,7 @@ ] } --> + # XML Fast And Easy, using SAX - Listener Functions This document explains how to use XML parsing in Lucee. @@ -428,4 +429,4 @@ You can modify the component as you like. Instead of storing the array, you can ## Footnotes You can see the details in this video: -[Xml-Fast and Easy](https://www.youtube.com/watch?v=_AP6GpVk7TE) \ No newline at end of file +[Xml-Fast and Easy](https://www.youtube.com/watch?v=_AP6GpVk7TE) diff --git a/examples/docker/basic/docker-compose.yml b/examples/docker/basic/docker-compose.yml index 25e23dfbd..7869a1057 100644 --- a/examples/docker/basic/docker-compose.yml +++ b/examples/docker/basic/docker-compose.yml @@ -6,8 +6,8 @@ services: volumes: - "./www:/var/www" ports: - - "8854:8888" # tomcat - - "8054:80" # nginx + - "8854:8888" # tomcat + - "8054:80" # nginx # how to run it # docker-compose up -d diff --git a/examples/docker/wip/docker-compose.yml b/examples/docker/wip/docker-compose.yml index 62b8f2838..1323e5576 100644 --- a/examples/docker/wip/docker-compose.yml +++ b/examples/docker/wip/docker-compose.yml @@ -7,7 +7,7 @@ services: - "./www:/var/www" - "./patches:/opt/lucee/server/lucee-server/patches" ports: - - "8854:8888" # tomcat - - "8054:80" # nginx + - "8854:8888" # tomcat + - "8054:80" # nginx # docker-compose up -d diff --git a/examples/docker/with-config/docker-compose.yml b/examples/docker/with-config/docker-compose.yml index 0dd8d94dd..a9c9620ce 100644 --- a/examples/docker/with-config/docker-compose.yml +++ b/examples/docker/with-config/docker-compose.yml @@ -6,8 +6,8 @@ services: volumes: - "./www:/var/www" ports: - - "8854:8888" # tomcat - - "8054:80" # nginx + - "8854:8888" # tomcat + - "8054:80" # nginx # how to run it # docker-compose up -d diff --git a/examples/docker/with-extension/docker-compose.yml b/examples/docker/with-extension/docker-compose.yml index 2c6b0fd64..ba2d5440c 100644 --- a/examples/docker/with-extension/docker-compose.yml +++ b/examples/docker/with-extension/docker-compose.yml @@ -6,7 +6,7 @@ services: volumes: - "./www:/var/www" ports: - - "8854:8888" # tomcat - - "8054:80" # nginx + - "8854:8888" # tomcat + - "8054:80" # nginx # docker-compose up -d diff --git a/examples/docker/with-patch/docker-compose.yml b/examples/docker/with-patch/docker-compose.yml index 2c6b0fd64..ba2d5440c 100644 --- a/examples/docker/with-patch/docker-compose.yml +++ b/examples/docker/with-patch/docker-compose.yml @@ -6,7 +6,7 @@ services: volumes: - "./www:/var/www" ports: - - "8854:8888" # tomcat - - "8054:80" # nginx + - "8854:8888" # tomcat + - "8054:80" # nginx # docker-compose up -d From e05117cbb06c5c2ee67195f9076a27deb03ce14d Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Wed, 26 Jun 2024 21:06:37 +0200 Subject: [PATCH 2/2] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fed87d524..1f91e4459 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: with: webroot: ${{ github.workspace }} execute: /build-all.cfm - luceeVersion: 6.0.3.1 + luceeVersion: 6.1.0.217-SNAPSHOT # redis, chart, lucene, form. ajax, chart extensions: 60772C12-F179-D555-8E2CD2B4F7428718;version=3.0.0.54-SNAPSHOT,D46B46A9-A0E3-44E1-D972A04AC3A8DC10,EFDEB172-F52E-4D84-9CD1A1F561B3DFC8,FAD67145-E3AE-30F8-1C11A6CCF544F0B7,6E2CB28F-98FB-4B51-B6BE6C64ADF35473,DF28D0A4-6748-44B9-A2FDC12E4E2E4D38 - name: Upload Artifact