FileDocCategorySizeDatePackage
XMLFileTransformer.javaAPI DocGlassfish v2 API5973Fri May 04 22:32:08 BST 2007com.sun.enterprise.util

NOOPHandler

public class NOOPHandler extends DefaultHandler
The internal NOOPHandler is needed to act as an entity resolver when parsing the domain.xml.template file. The problem is that the DOCTYPE in this template has a token of the form ${com.sun.aas.installRoot} which cannot be resolved using the standard entity resolver. Instead we explicitly pass the DTD file name to parse against in the constructor of this class.

Fields Summary
private final String
_dtdFileName
Constructors Summary
NOOPHandler(String dtdFileName)

        super();
        _dtdFileName = dtdFileName;
    
Methods Summary
public org.xml.sax.InputSourceresolveEntity(java.lang.String publicId, java.lang.String systemId)

        InputSource is = null;
        try {
            is = new InputSource(new FileInputStream(_dtdFileName));
        } catch(Exception e) {
            throw new SAXException("cannot resolve dtd", e);
        }
        return is;