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 |
---|---|---|
|
| 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 |
---|---|---|
|
| Used by |
Mail provider
The following table lists available context.xml
configuration values for outgoing mail servers.
Key | Type | Description |
---|---|---|
|
| Indicates integration of a mail provider with Brightspot. Set the value to a label that identifies the configuration of the mail provider. |
|
| 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 |
|
| Host on which your mail provider runs. Replace |
|
| Port number on which the outgoing mail server is running. Replace |
|
| Username for the outgoing mail server. Replace |
|
| Password for the outgoing mail server. Replace |
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" />
Overriding configuration values
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 incontext.xml
.If false, the setting in
context.xml
takes precedence over the corresponding setting in the webapp'sweb.xml
.
For example, the following stanza appears 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
.
<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
.