Miscellaneous Configuration

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

Signed Cookies

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

Key Type Description
dari/cookieSecret java.lang.String Used by the JspUtils class to implement secure signed cookies. Enter a reasonably long random string of characters.

Caching Filter

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

Key Type Description
dari/isCachingFilterEnabled java.lang.Boolean Used by CachingDatabaseFilter to create or not create an instance of CachingDatabase.

Mail Provider

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

Key Type Description
dari/defaultMailProvider java.lang.String Indicates integration of a mail provider with Brightspot. Set the value to a label that identifies the configuration of the mail provider.
dari/mailProvider/{id}/class java.lang.String Mail 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. Replace {id} with the value that you set for dari/defaultMailProvider.
dari/mailProvider/{id}/host java.lang.String Host on which your mail provider runs. Replace {id} with the value that you set for dari/defaultMailProvider.
dari/mailProvider/{id}/port java.lang.String Port number on which the outgoing mail server is running. Replace {id} with the value that you set for dari/defaultMailProvider.
dari/mailProvider/{id}/username java.lang.String Username for the outgoing mail server. Replace {id} with the value that you set for dari/defaultMailProvider.
dari/mailProvider/{id}/password java.lang.String Password for the outgoing mail server. Replace {id} with the value that you set for dari/defaultMailProvider.

The following snippet configures out 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" />