DirContext resources = context.getResources();
if (resources != null) {
String fullPath = context.getPath() + normPath;
String hostName = context.getParent().getName();
try {
resources.lookup(normPath);
URI uri = new URI("jndi", null, "", -1,
getJNDIUri(hostName, fullPath), null, null);
return new URL(null, uri.toString(),
new DirContextURLStreamHandler(resources));
} catch (NamingException e) {