本文整理了Java中org.apache.naming.resources.WARDirContext.loadEntries()
方法的一些代码示例,展示了WARDirContext.loadEntries()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WARDirContext.loadEntries()
方法的具体详情如下:
包路径:org.apache.naming.resources.WARDirContext
类名称:WARDirContext
方法名:loadEntries
[英]Constructs a tree of the entries contained in a WAR file.
[中]构建WAR文件中包含的条目树。
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Add a resources JAR. The contents of /META-INF/resources/ will be used if
* a requested resource can not be found in the main context.
*/
public void addResourcesJar(URL url) {
try {
JarURLConnection conn = (JarURLConnection) url.openConnection();
JarFile jarFile = conn.getJarFile();
ZipEntry entry = jarFile.getEntry("/");
WARDirContext warDirContext = new WARDirContext(jarFile,
new WARDirContext.Entry("/", entry));
warDirContext.loadEntries();
altDirContexts.add(warDirContext);
} catch (IOException ioe) {
log.warn(sm.getString("resources.addResourcesJarFail", url), ioe);
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Add a resources JAR. The contents of /META-INF/resources/ will be used if
* a requested resource can not be found in the main context.
*/
public void addResourcesJar(URL url) {
try {
JarURLConnection conn = (JarURLConnection) url.openConnection();
JarFile jarFile = conn.getJarFile();
ZipEntry entry = jarFile.getEntry("/");
WARDirContext warDirContext = new WARDirContext(jarFile,
new WARDirContext.Entry("/", entry));
warDirContext.loadEntries();
altDirContexts.add(warDirContext);
} catch (IOException ioe) {
log.warn(sm.getString("resources.addResourcesJarFail", url), ioe);
}
}
代码示例来源:origin: jboss.web/jbossweb
loadEntries();
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
loadEntries();
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
loadEntries();
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Add a resources JAR. The contents of /META-INF/resources/ will be used if
* a requested resource can not be found in the main context.
*/
public void addResourcesJar(URL url) {
try {
JarURLConnection conn = (JarURLConnection) url.openConnection();
JarFile jarFile = conn.getJarFile();
ZipEntry entry = jarFile.getEntry("/");
WARDirContext warDirContext = new WARDirContext(jarFile,
new WARDirContext.Entry("/", entry));
warDirContext.loadEntries();
altDirContexts.add(warDirContext);
} catch (IOException ioe) {
log.warn(sm.getString("resources.addResourcesJarFail", url), ioe);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Add a resources JAR. The contents of /META-INF/resources/ will be used if
* a requested resource can not be found in the main context.
*/
public void addResourcesJar(URL url) {
try {
JarURLConnection conn = (JarURLConnection) url.openConnection();
JarFile jarFile = conn.getJarFile();
ZipEntry entry = jarFile.getEntry("/");
WARDirContext warDirContext = new WARDirContext(jarFile,
new WARDirContext.Entry("/", entry));
warDirContext.loadEntries();
altDirContexts.add(warDirContext);
} catch (IOException ioe) {
log.warn(sm.getString("resources.addResourcesJarFail", url), ioe);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Add a resources JAR. The contents of /META-INF/resources/ will be used if
* a requested resource can not be found in the main context.
*/
public void addResourcesJar(URL url) {
try {
JarURLConnection conn = (JarURLConnection) url.openConnection();
JarFile jarFile = conn.getJarFile();
ZipEntry entry = jarFile.getEntry("/");
WARDirContext warDirContext = new WARDirContext(jarFile,
new WARDirContext.Entry("/", entry));
warDirContext.loadEntries();
altDirContexts.add(warDirContext);
} catch (IOException ioe) {
log.warn(sm.getString("resources.addResourcesJarFail", url), ioe);
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
loadEntries();
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
loadEntries();
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
loadEntries();
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Set the document root.
*
* @param docBase The new document root
*
* @exception IllegalArgumentException if the specified value is not
* supported by this implementation
* @exception IllegalArgumentException if this would create a
* malformed URL
*/
public void setDocBase(String docBase) {
// Validate the format of the proposed document root
if (docBase == null)
throw MESSAGES.invalidNullDocumentBase();
if (!(docBase.endsWith(".war")))
throw MESSAGES.docBaseNotWar(docBase);
// Calculate a File object referencing this document base directory
File base = new File(docBase);
// Validate that the document base is an existing directory
if (!base.exists() || !base.canRead() || base.isDirectory())
throw MESSAGES.docBaseNotWar(docBase);
try {
this.base = new ZipFile(base);
} catch (Exception e) {
throw MESSAGES.failedOpeningWar(e.getMessage());
}
super.setDocBase(docBase);
loadEntries();
}
内容来源于网络,如有侵权,请联系作者删除!