I am using the Jakarta Commons Digester to facilitate XML-to-Object mapping in an init servlet.
I created the following:
1. myapp-rules.xml (containing rules for Digester)
2. attributes.xml (actual config file that I need to load & parse, and then place the objects in a data structure).
3. The POJO with setters and getters which holds the config file's info (after parsed through the init servlet).
4. A helper class which adds the POJOs to an ArrayList.
5. The init servlet which places myapp-rules.xml into the CLASSPATH and then loads the attributes.xml config file. This is where I think I need help on how to add it to the helper class.
Here's my web.xml file:
Here's the the Attributes POJO:
The helper class which I want to put the AttributeBean POJO inside an ArrayList:
Here's the init servlet (this is where I need help on how to add POJO to Helper class (array list): import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.net.URL;