Brightspot CMS Developer Guide

Miscellaneous Dari configuration


You can configure the following Dari features in the Tomcat context.xml file, where options are expressed as name-value pairs.


The following table lists available context.xml configuration values for signed cookies.

KeyTypeDescription
dari/cookieSecretjava.lang.StringUsed by the JspUtils class to implement secure signed cookies. Enter a reasonably long random string of characters.

The following table lists available context.xml configuration values for caching filters.

KeyTypeDescription
dari/isCachingFilterEnabledjava.lang.BooleanUsed by CachingDatabaseFilter to create or not create an instance of CachingDatabase.

The following table lists available context.xml configuration values for outgoing mail servers.

Key
Type
Description
dari/defaultMailProviderjava.lang.StringSpecifies the default email provider configuration. (For information about default configurations, see Configuration identifiers, key prefixes, and defaults.)
dari/mailProvider/{id}/classjava.lang.StringMail provider class that implements the MailProvider interface. Set the value to the fully qualified class name. You can specify a custom class or SmtpMailProvider provided with Brightspot. For the default class, replace {id} with the value that you set for dari/defaultMailProvider.
dari/mailProvider/{id}/hostjava.lang.StringHost on which your mail provider runs. For the default host, replace {id} with the value that you set for dari/defaultMailProvider.
dari/mailProvider/{id}/portjava.lang.StringPort number on which the outgoing mail server is running. For the default port, replace {id} with the value that you set for dari/defaultMailProvider.
dari/mailProvider/{id}/usernamejava.lang.StringUsername for the outgoing mail server. For the default username, replace {id} with the value that you set for dari/defaultMailProvider.
dari/mailProvider/{id}/passwordjava.lang.StringPassword for the outgoing mail server. For the default password, replace {id} with the value that you set for dari/defaultMailProvider.

The following snippet configures a default outgoing mail server with ID mymailserver.

<Environment name="dari/defaultMailProvider" type="java.lang.String" value="mymailserver" />
<Environment name="dari/mailProvider/mymailserver/class" type="java.lang.String" value="com.psddev.dari.util.SmtpMailProvider" />
<Environment name="dari/mailProvider/mymailserver/host" type="java.lang.String" value="mysmtpserver.amazonaws.com" />
<Environment name="dari/mailProvider/mymailserver/port" type="java.lang.String" value="8080" />
<Environment name="dari/mailProvider/mymailserver/username" type="java.lang.String" value="handsome" />
<Environment name="dari/mailProvider/mymailserver/password" type="java.lang.String" value="evenmorehandsome" />


The following table lists available context.xml configuration values for outgoing SMS services.

KeyTypeDescription
dari/defaultSmsProviderjava.lang.StringSpecifies the default SMS provider configuration. (For information about default configurations, see Configuration identifiers, key prefixes, and defaults.)
dari/smsProvider/{id}/classjava.lang.StringSMS provider class that implements the SmsProvider interface. Set the value to the fully qualified class name. You can specify a custom class or TwilioSmsProvider provided with Brightspot. For the default class, replace {id} with the value that you set for dari/defaultSmsProvider.
dari/smsProvider/{id}/accountSidjava.lang.StringYour account ID with the SMS provider. For the default account ID, replace {id} with the value that you set for dari/defaultSmsProvider.
dari/mailProvider/{id}/authTokenjava.lang.StringAuthentication token for you SMS account. For the default token, replace {id} with the value that you set for dari/defaultSmsProvider.
dari/mailProvider/{id}/defaultFromNumberjava.lang.StringDefault “from” number appearing on recipients’ devices. For the default number, replace {id} with the value that you set for dari/defaultSmsProvider.

The following snippet configures a default outgoing mail server with ID mysmsprovider.

<Environment name="dari/defaultSmsProvider" type="java.lang.String" value="mysmsprovider" />
<Environment name="dari/mailProvider/mysmsprovider/class" type="java.lang.String" value="com.psddev.dari.util.TwilioSmsProvider" />
<Environment name="dari/mailProvider/mysmsprovider/accountSid" type="java.lang.String" value="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" />
<Environment name="dari/mailProvider/mysmsprovider/authToken" type="java.lang.String" value="myauthenticationtoken" />
<Environment name="dari/mailProvider/mymailserver/defaultFromNumber" type="java.lang.String" value="+15017122661" />


Almost every <environment> element in context.xml includes a Boolean override attribute.

  • If true, the corresponding setting in the webapp’s web.xml takes precedence over the setting in context.xml.
  • If false, the setting in context.xml takes precedence over the corresponding setting in the webapp’s web.xml.

For example, the following stanza appears in web.xml.

Configuration in web.xml

<env-entry>
    <env-entry-name>cms/tool/isAutoCreateUser</env-entry-name>
    <env-entry-type>java.lang.Boolean</env-entry-type>
    <env-entry-value>true</env-entry-value>
</env-entry>

The following corresponding element appears in context.xml.

Configuration in context.xml

<Environment name="cms/tool/isAutoCreateUser" type="java.lang.Boolean" value="false" override="false" />

In this scenario, the value false in "Configuration in context.xml" takes precedence over the value in "Configuration in web.xml," because the override attribute is set to false.

Previous Topic
Sample SAML configuration
Next Topic
Theme guide
Was this topic helpful?
Thanks for your feedback.
Our robust, flexible Design System provides hundreds of pre-built components you can use to build the presentation layer of your dreams.

Asset types
Module types
Page types
Brightspot is packaged with content types that get you up and running in a matter of days, including assets, modules and landing pages.

Content types
Modules
Landing pages
Everything you need to know when creating, managing, and administering content within Brightspot CMS.

Dashboards
Publishing
Workflows
Admin configurations
A guide for installing, supporting, extending, modifying and administering code on the Brightspot platform.

Field types
Content modeling
Rich-text elements
Images
A guide to configuring Brightspot's library of integrations, including pre-built options and developer-configured extensions.

Google Analytics
Shopify
Apple News