if (currentPath != null && entityPath.startsWith(currentPath + File.pathSeparator)) {
if (currentPath != null && entityPath.startsWith(currentPath + File.separator)) {
                    public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {                        if (systemId == null) {                            return null;                        }                        String entityPath = systemId.substring("file://".length());                                                // relative to configuration file                        File file = new File(context.getRealPath(configFile));                                                // remove home path automatically appended                         String currentPath = new File(System.getProperty("user.dir")).getCanonicalPath();                        if (currentPath != null && entityPath.startsWith(currentPath + File.pathSeparator)) {                            entityPath = entityPath.substring(currentPath.length() + 1);                        }                                                File entityFile = new File(file.getParentFile(), entityPath);                        FileInputStream fileInputStream = new FileInputStream(entityFile);                                                return new InputSource(fileInputStream);                    }