Customizing Danno and Dannotate

Danno and Dannotate have been designed to to be customized without the need to touch the actual Java source files. Customization is performed using the Chico customization mechanisms as described in this page.


Configuring Danno and Dannotate with Chico

At the low level, Danno and Dannotate use Spring dependency injection to configure the various servlets in an installation. A site configuration is represented as a number of Spring XML wiring files which specify various configuration parameters and wire up various "beans" to perform tasks such as validation, filtering, persistence and access control.

Building a Danno / Dannotate configuration from scratch would be a daunting task, so the base distribution comes with a set of Spring wiring files that implement the common cases. These configurations are designed use the Chico infrastructure so that simple tailoring can be implemented by setting property values in a couple of properties files.

The Chico documentation describes:

  • how and where to set the configuration properties, and
  • how to create a Chico-based manageable configuration for your custom webapp.

Procedure for creating a custom Danno / Dannotate webapp.

  1. Select a site template for your site from the following list:
    • "danno.demosite" is a template that provides a Danno installation without any browser-based annotation tools.
    • "dannotate.demosite" is a template that provides a Dannotate installation without a backend Annotea server.
    • "combined.demosite" is a template that provides both and client and server-side functionality in the same webapp.
  2. Create a custom site project based on the template by following these instructions.
  3. Adjust the relevant Danno, Dannotate and Emmet configuration settings as required using placeholder substitutions and property overrides. The configurable settings are described in the following pages:
  4. Create overrides for Spring wiring files, JSPs and other deployed files as required following the procedure described here.
  5. Build the custom webapp by following the instructions here.

Implementation details

The XML wiring files for Danno and Dannotate may be found in the danno.webapp, dannotate.webapp and danno.common.webapps directories; look in the respective src/main/webapp/WEB-INF directories in the source tree. In addition, there are three "demosite" directories that serve as templates for site-specific customization.

Advanced Configuration

While the Chico site customization approach deals with simple cases, a major customization of Danno and Dannotate is likely to require a degree of understanding of Spring wiring files, and of the way that Spring IoC, Spring MVC, and Spring Security work. If you are not familiar with Spring, we recommend that you read (at least) the IoC and MVC chapters of the online Spring Framework Reference, and the relevant parts of the Spring Security Reference.