本文整理了Java中org.apache.catalina.WebResourceRoot.getClassLoaderResource()
方法的一些代码示例,展示了WebResourceRoot.getClassLoaderResource()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebResourceRoot.getClassLoaderResource()
方法的具体详情如下:
包路径:org.apache.catalina.WebResourceRoot
类名称:WebResourceRoot
方法名:getClassLoaderResource
[英]Obtain the object that represents the class loader resource at the given path. WEB-INF/classes is always searched prior to searching JAR files in WEB-INF/lib. The search order for JAR files will be consistent across subsequent calls to this method until the web application is reloaded. No guarantee is made as to what the search order for JAR files may be.
[中]获取表示给定路径上的类装入器资源的对象。在WEB-INF/lib中搜索JAR文件之前,总是先搜索WEB-INF/classes。JAR文件的搜索顺序将在对该方法的后续调用中保持一致,直到重新加载web应用程序。无法保证JAR文件的搜索顺序。
代码示例来源:origin: org.apache.tomee/tomee-catalina
@Override
public WebResource getClassLoaderResource(final String path) {
return delegate.getClassLoaderResource(path);
}
代码示例来源:origin: codefollower/Tomcat-Research
resource = resources.getClassLoaderResource(path);
代码示例来源:origin: codefollower/Tomcat-Research
long lastModified = resources.getClassLoaderResource(
entry.getKey()).getLastModified();
if (lastModified != cachedLastModified) {
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
long lastModified = resources.getClassLoaderResource(
entry.getKey()).getLastModified();
if (lastModified != cachedLastModified) {
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
long lastModified = resources.getClassLoaderResource(
entry.getKey()).getLastModified();
if (lastModified != cachedLastModified) {
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
resource = resources.getClassLoaderResource(path);
resource = resources.getClassLoaderResource(path);
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
resource = resources.getClassLoaderResource(path);
resource = resources.getClassLoaderResource(path);
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Find the specified resource in our local repository, and return a
* <code>URL</code> referring to it, or <code>null</code> if this resource
* cannot be found.
*
* @param name Name of the resource to be found
*/
@Override
public URL findResource(final String name) {
if (log.isDebugEnabled())
log.debug(" findResource(" + name + ")");
checkStateForResourceLoading(name);
URL url = null;
String path = nameToPath(name);
WebResource resource = resources.getClassLoaderResource(path);
if (resource.exists()) {
url = resource.getURL();
trackLastModified(path, resource);
}
if ((url == null) && hasExternalRepositories) {
url = super.findResource(name);
}
if (log.isDebugEnabled()) {
if (url != null)
log.debug(" --> Returning '" + url.toString() + "'");
else
log.debug(" --> Resource not found, returning null");
}
return url;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Find the specified resource in our local repository, and return a
* <code>URL</code> referring to it, or <code>null</code> if this resource
* cannot be found.
*
* @param name Name of the resource to be found
*/
@Override
public URL findResource(final String name) {
if (log.isDebugEnabled())
log.debug(" findResource(" + name + ")");
checkStateForResourceLoading(name);
URL url = null;
String path = nameToPath(name);
WebResource resource = resources.getClassLoaderResource(path);
if (resource.exists()) {
url = resource.getURL();
trackLastModified(path, resource);
}
if ((url == null) && hasExternalRepositories) {
url = super.findResource(name);
}
if (log.isDebugEnabled()) {
if (url != null)
log.debug(" --> Returning '" + url.toString() + "'");
else
log.debug(" --> Resource not found, returning null");
}
return url;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
log.debug(" Searching local repositories");
String path = nameToPath(name);
WebResource resource = resources.getClassLoaderResource(path);
if (resource.exists()) {
stream = resource.getInputStream();
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
log.debug(" Searching local repositories");
String path = nameToPath(name);
WebResource resource = resources.getClassLoaderResource(path);
if (resource.exists()) {
stream = resource.getInputStream();
内容来源于网络,如有侵权,请联系作者删除!