本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.getExtraClasspath()
方法的一些代码示例,展示了WebAppContext.getExtraClasspath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.getExtraClasspath()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:getExtraClasspath
暂无
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
/** Constructor.
*/
public WebAppClassLoader(ClassLoader parent, WebAppContext context)
throws IOException
{
super(new URL[]{},parent!=null?parent
:(Thread.currentThread().getContextClassLoader()!=null?Thread.currentThread().getContextClassLoader()
:(WebAppClassLoader.class.getClassLoader()!=null?WebAppClassLoader.class.getClassLoader()
:ClassLoader.getSystemClassLoader())));
_parent=getParent();
_context=context;
if (_parent==null)
throw new IllegalArgumentException("no parent classloader!");
if (context.getExtraClasspath()!=null)
addClassPath(context.getExtraClasspath());
}
代码示例来源:origin: eclipse-jetty/eclipse-jetty-plugin
protected Collection<String> getClassPathDescription(Collection<String> classPath, Handler... handlers)
{
if (handlers != null)
{
for (Handler handler : handlers)
{
if (handler instanceof HandlerCollection)
{
getClassPathDescription(classPath, ((HandlerCollection) handler).getHandlers());
}
else if (handler instanceof WebAppContext)
{
String extraClasspath = ((WebAppContext) handler).getExtraClasspath();
if (extraClasspath != null)
{
// Collections.addAll(classPath, extraClasspath.split(File.pathSeparator)); // it seems, Jetty was built for Windows
Collections.addAll(classPath, extraClasspath.split(";"));
}
}
}
}
return classPath;
}
}
内容来源于网络,如有侵权,请联系作者删除!