http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5739
To help improve error checking, what if we took the digester one step further and used it to verify that the struts-config.xml file was well-formed (ie, no duplicates, missing attributes, etc)? This would be done using an XML schema file. There wouldn't be much coding required because the digester uses an XML parser that would throw a parsing error for such cases once a schema is set. If there is still interest, I'll volunteer to put something together. How does this sound?
You can turn on DTD validation of struts-config files with a servlet init parameter:
see http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config
This value is true by default; if I recall correctly, validation errors are not fatal, but are logged. For most people, the common validation errors are not important to Struts -- they have to do with the ordering of elements, which matters not to Digester.
The best way to avoid breaking the struts-config file is to use the Struts Console.
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Imagine if every Thursday your shoes exploded if you tied them the usual way. This happens to us all the time with computers, and nobody thinks of complaining."
-- Jef Raskin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]