Skip to main content

Debug tools

To enable Dari debug tools, add the following to your web.xml file:

showLineNumbers
1
<filter>
2
<filter-name>ApplicationFilter</filter-name>
3
<filter-class>com.psddev.dari.db.ApplicationFilter</filter-class>
4
</filter>
5
<filter-mapping>
6
<filter-name>ApplicationFilter</filter-name>
7
<url-pattern>/*</url-pattern>
8
<dispatcher>ERROR</dispatcher>
9
<dispatcher>FORWARD</dispatcher>
10
<dispatcher>INCLUDE</dispatcher>
11
<dispatcher>REQUEST</dispatcher>
12
</filter-mapping>

The following table lists context.xml keys for configuring a username and password to access the debugging tools in a production environment.

KeyTypeDescription
dari/debugUsernamejava.lang.StringUsername required to access the Dari debug tools. If Brightspot is in development mode, this key is not necessary and any user can access the Dari debug tools.
dari/debugPasswordjava.lang.StringPassword required to access the Dari debug tools. If Brightspot is in development mode, this key is not necessary and any user can access the Dari debug tools.
dari/debugRealmjava.lang.StringIf you define a protection space for the Dari debug tools, set the realm value.

The following snippet is an example of enabling debugging on a production instance of Brightspot. When a user goes to the URL http://www.example.com/_debug, the browser prompts for the username and password, and validates the login against myusername and mypassword.

showLineNumbers
1
<Environment name="dari/debugUsername" type="java.lang.String" value="myusername" />
2
<Environment name="dari/debugPassword" type="java.lang.String" value="mypassword" />

See also: