Blue Elephant Referee Scheduler
XML
Configuration Files
Intro:
Several
different levels of this application are controlled through XML configuration
files. The Struts Framework at controller layer and Hibernate at the data
control layer use such files extensively.
Motivation:
Using
external configuration files to control the application as opposed to putting
this information in the code itself has two main advantages. First, all the
configuration information is moved into one centralized location. This helps
making configuration level changes to the application extremely simple. Next,
the application does not need to be recompiled if simple configuration level
changes are made to the application.
Usage:
The
following are the primary XML Configuration files used in this application:
- Web Deployment Descriptor (web.xml)
This file is used to define most of the application level parameters.
These include the application name, the list of tag libraries used,
servlet and filter declarations. Chapter 7.1 of Tomcat: The Definite Guide
from O’Reilly explains the contents of the file in great detail.
- Struts Configuration
(struts-config.xml)
The Struts Framework provides the Controller part of the MVC architecture
used in this application. The behavior of the framework is controlled
through this file. A major part of this file is struts mappings which are
described in our Struts section.
- Struts Validator
Configuration (validation.xml
and validator-rules.xml)
- Hibernate Mappings (Field.hbm.xml,
Game.hbm.xml and User.hbm.xml)
These files are used to describe the mapping between the model and the
database. Their use is described in greater detail in our Hibernate
section.
Links: