apache Digester 从本地加载dtd文件

 

Digester digester = initDigester();

String dtd = "/com/test/test.dtd";

ClassPathResource res = new ClassPathResource(dtd);

String doctypePublic = " -//Apache Software Foundation//DTD Struts Configuration 1.0//EN ";

digester.register(doctypePublic, res.getURL().toString());

 

你可能感兴趣的:(apache)