For the complete documentation index, see llms.txt. This page is also available as Markdown.

GetContextRoot

Gets the context root.

If BoxLang is not running as a servlet-based web server, this always returns "/".

Method Signature

GetContextRoot()

Arguments

This function does not accept any arguments

Examples

Get the context root of the current request

root = getContextRoot();
writeOutput( isString( root ) );

Result: true

Last updated

Was this helpful?