On Wed, 6 Mar 2002, Matt Raible wrote:
> I am developing an application that will require different application
> settings for different machines/customers.
> Because of this, I want to to externalize certain configuration
> settings to a XML file outside of web.xml - let's call this myApp.xml.
> I have a StartupServlet that I can parse this file with.
> 1. What should I use to parse this file - SAX, DOM, Digester?
I have used jdom and really like it. It's not blindingly fast, but it
saves me enough time that I don't mind.
> 2. Should I have a bean that represents all the configuration settings, and
> put this in the ServletContext as an attirubute, or each individual setting?
I think the settings should all be contained in a bean.
> 3. If I use Digester and a bean (seems good), should I change my XML in the
> following snippet?
> <application>
> <respository>
> <root>d:/repository</root>
> <assets>assets</assets>
> <viewPath>file://d:/repository/assets</viewPath>
> </respository>
> <assessment>
> <!-- This value is a percentage -->
> <default-passing-score>75</default-passing-score>
> </assessment>
> </application>
Looks reasonable.
dave
--
Dave Weis "I believe there are more instances of the abridgement
[EMAIL PROTECTED] of the freedom of the people by gradual and silent
encroachments of those in power than by violent
and sudden usurpations."- James Madison
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>