This is a method that parses the configuration file
(in a very simplistic manner) and reads the handler
definitions supplied.
Hashtable handlers = new Hashtable();
BufferedReader reader =
new BufferedReader(new FileReader(configFile));
String line = null;
while ((line = reader.readLine()) != null) {
// Syntax is "handlerName, handlerClass"
int comma;
// Skip comments
if (line.startsWith("#")) {
continue;
}
// Skip empty or useless lines
if ((comma = line.indexOf(",")) < 2) {
continue;
}
// Add the handler name and the handler class
handlers.put(line.substring(0, comma),
line.substring(comma+1));
}
return handlers;