Package org.glassfish.web
Class WebEntityResolver
- java.lang.Object
-
- org.glassfish.web.WebEntityResolver
-
- All Implemented Interfaces:
org.glassfish.hk2.api.PostConstruct
,EntityResolver
@Service(name="web") @ContractsProvided({WebEntityResolver.class,org.xml.sax.EntityResolver.class}) public class WebEntityResolver extends Object implements EntityResolver, org.glassfish.hk2.api.PostConstruct
EntityResolver
that recognizes known public IDs of JavaEE DTDs/schemas and return a local copy.This implementation assumes that those files are available in $INSTALL_ROOT/lib/schemas and $INSTALL_ROOT/lib/dtds, but in different environment, different implementation can be plugged in to perform entirely different resolution.
- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description WebEntityResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
postConstruct()
InputSource
resolveEntity(String publicId, String systemId)
If the parser hits one of the well-known DTDs, parse local copies instead of hitting the remote server.
-
-
-
Method Detail
-
postConstruct
public void postConstruct()
- Specified by:
postConstruct
in interfaceorg.glassfish.hk2.api.PostConstruct
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
If the parser hits one of the well-known DTDs, parse local copies instead of hitting the remote server.- Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException
-
-