if ("www.opensymphony.com".equals(url.getHost())) {
if ("www.opensymphony.com".equals(url.getHost()) && systemId.endsWith(".dtd")) {
    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {        if (systemId == null) {            return null;        }        URL url = new URL(systemId);        String file = url.getFile();        if ((file != null) && (file.indexOf('/') > -1)) {            file = file.substring(file.lastIndexOf('/') + 1);        }        if ("www.opensymphony.com".equals(url.getHost())) {            InputStream is = getClass().getResourceAsStream("/META-INF/" + file);            if (is == null) {                is = getClass().getResourceAsStream("/" + file);            }            if (is != null) {                return new InputSource(is);            }        }        return null;    }