Commit 3c9af842 authored by Mathieu Lirzin's avatar Mathieu Lirzin

Fixed: Display file name in XML parsing errors

(OFBIZ-6993)
parent 071a7423
......@@ -253,11 +253,12 @@ public final class WebAppUtil {
LocalResolver lr = new LocalResolver(new DefaultHandler());
ErrorHandler handler = new LocalErrorHandler(webXmlFileLocation, lr);
Digester digester = DigesterFactory.newDigester(validate, namespaceAware, new WebRuleSet(), false);
digester.getParser();
digester.push(result);
digester.setErrorHandler(handler);
try (InputStream is = new FileInputStream(file)) {
digester.parse(new InputSource(is));
InputSource iso = new InputSource(is);
iso.setSystemId(file.getAbsolutePath());
digester.parse(iso);
} finally {
digester.reset();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment