Not all containers hold the webapp DTDs in servlet.jar (e.g. Weblogic doesn't). So instead of throwing an exception return null so the xml parser may continue to resolve the entity.