(1) I would could using JDOM for this? Depends on deployment size of the application
You will need xerces.jar as well as jdom.jar.

For mini applications then common digester is worth considering.

Oh yes www.jdom.org

(2) Yes or make it accessible as static property of the StartupServlet.


--
Peter Pilgrim                       ++44 (0)207-545-9923

............................................ Swamped under electronic mails


---------------------------------------- Message History 
----------------------------------------


From:  Matt Raible <[EMAIL PROTECTED]> on 06/03/2002 07:41 PST

Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]>

To:    Struts Users Mailing List <[EMAIL PROTECTED]>
cc:
Subject:    "Best Practice" for parsing an XML file for application configuration 
parameters?

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?

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?


<CUT>




--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to