All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.directwebremoting.util.EmptyEntityResolver Maven / Gradle / Ivy

Go to download

DWR is easy Ajax for Java. It makes it simple to call Java code directly from Javascript. It gets rid of almost all the boiler plate code between the web browser and your Java code.

There is a newer version: 3.0.2-RELEASE
Show newest version
package org.directwebremoting.util;

import java.io.IOException;
import java.io.StringReader;

import org.directwebremoting.impl.DefaultPageNormalizer;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

/**
 * An EntityResolver for use when you don't want to do any entity resolving.
 * 

I think this is technically a violation of all sorts of things because the * DTD affects how a document is parsed, and this just dumps all DTDs. However * when you are not interested in validity, you just want to get informaion when * you know that the DTD won't affect the documnent, this could be useful. * @author Joe Walker [joe at getahead dot ltd dot uk] */ public class EmptyEntityResolver implements EntityResolver { /* (non-Javadoc) * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String) */ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { log.debug("resolveEntity(publicId=" + publicId + ", systemId=" + systemId + ") returning null"); InputSource is = new InputSource(new StringReader("")); is.setPublicId(publicId); is.setSystemId(systemId); return is; } /** * The log stream */ private static final Logger log = Logger.getLogger(DefaultPageNormalizer.class); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy