Access to Services

When developing templates or scripts only a small list of services are available to use. You can expose other services with the following steps.

Crafter CMS Services

If your site includes a custom application context with services, you can make them available by adding them to the comma-separated list in the configuration file:

# Patterns for beans that should be accessible from the site application context


The value from the configuration is used as a regular expression, if the value contains special characters you will need to escape them with backslashes \\.

System Services


This setting will disable restrictions for all sites

System objects like servletContext cannot be exposed by adding them to a list, instead you will need to change the following configuration in the file:

# Expose all services