You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by I-Shen Leong <is...@pwrsrc.net> on 2004/01/25 09:31:46 UTC
[Bug 5739] - Struts fails silently in too many places
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?
I-Shen
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org
Re: [Bug 5739] - Struts fails silently in too many places
Posted by Joe Germuska <Jo...@Germuska.com>.
At 12:31 AM -0800 1/25/04, I-Shen Leong wrote:
>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
Joe@Germuska.com
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: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org