Directives
These are the global configuration settings for the runtime
Below you can find all the configuration directives the language supports.
Application Timeout
The default timeout for applications in BoxLang. The default is 0 = never expires. The value must be a string timespan using the syntax shown:
Class Generation Directory
This is the location where BoxLang will store compiled classes.
Custom Tags Directory
BoxLang allows you to register global locations where we can register custom tags for use in your templates:
Debug Mode
This is a powerful setting. It puts the runtime into debug mode, where more verbose debugging will be activated, and when exceptions occur, more information will be shown by default. The default is false
an we highly discourage its use in production.
Default Remote Method Return Format
The default return format for class invocations via web runtimes.
Invoke Implicit Accessors
In BoxLang, the default for implicit accessors is true
. This means that properties on a class can be accessed externally, like field properties for mutation or access.
Simple example:
Java Library Paths
BoxLang allows you to register an array of locations or array of jars or classes that the runtime will class load into the runtime class loader. This allows you to class-load Java applications at runtime.
By default, we look into the lib
folder in your BoxLang home.
Locale
This is the default locale for the runtime. By default, we use the JVM locale. This value must be an IETF BCP language tag: https://www.oracle.com/java/technologies/javase/jdk21-suported-locales.html
Mappings
Here is where you can create global class mappings in BoxLang. The value is a JSON object where the key is the name of the mapping, and the value is the absolute path location of the mapping. You can prefix the name of the mapping with /
or not. Ultimately, we will add it for you as well.
Mappings are used to discover BoxLang classes, files and more.
Modules Directory
BoxLang will search your home for a modules
folder and register the modules found. However, you can add multiple locations to search for BoxLang modules. Each entry must be an absolute location.
Request Timeout
The default timeout for requests in BoxLang. The default is 0 = never expire. The value must be a string timespan using the syntax shown:
Session Timeout
The default timeout for sessions in BoxLang. The default is 30 minutes. The value must be a string timespan using the syntax shown:
Session Storage
In BoxLang, you can configure your user sessions to be stored in memory
by default in a BoxLang sessions cache, or you can give it a custom cache name to store them in. If it's not memory
` then it must be a valid registered cache. (See Caches)
Timezone
This is the global timezone to use in the runtime. By default, it will use the JVM timezone. This value requires IANA timezone database values: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
Use High Precision Math
By default BoxLang uses high-precision mathematics via BigDecimal
operations. It analyses your operations and determines the precision accordingly. You can turn this off here for all applications and use Double based operations. If you disable this feature, then if you want high precision you will have to use the precisionEvaluate( expression )
BIF instead.
Valid Class Extensions
This is an array of all the extensions that will be processed as BoxLang classes. By default we target bx, cfc
.
Valid Template Extensions
This is an array of all the extensions that will be processed as BoxLang templates. Meaning you can execute them and include them.
Last updated
Was this helpful?