本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.getClassLoader()
方法的一些代码示例,展示了WebAppContext.getClassLoader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.getClassLoader()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:getClassLoader
暂无
代码示例来源:origin: org.springframework.osgi/spring-osgi-web
/**
* Starts the Jetty web context class.
*
* @param wac,
* @throws Exception
*/
private void startWebAppContext(WebAppContext wac) throws Exception {
HandlerCollection contexts = getJettyContexts();
// set the TCCL since it's used internally by Jetty
Thread current = Thread.currentThread();
ClassLoader old = current.getContextClassLoader();
try {
current.setContextClassLoader(wac.getClassLoader());
if (contexts != null) {
contexts.addHandler(wac);
}
wac.start();
if (contexts != null) {
contexts.start();
}
}
finally {
current.setContextClassLoader(old);
}
}
代码示例来源:origin: org.springframework.osgi/org.springframework.osgi.web
/**
* Starts the Jetty web context class.
*
* @param wac,
* @throws Exception
*/
private void startWebAppContext(WebAppContext wac) throws Exception {
HandlerCollection contexts = getJettyContexts();
// set the TCCL since it's used internally by Jetty
Thread current = Thread.currentThread();
ClassLoader old = current.getContextClassLoader();
try {
current.setContextClassLoader(wac.getClassLoader());
if (contexts != null) {
contexts.addHandler(wac);
}
wac.start();
if (contexts != null) {
contexts.start();
}
}
finally {
current.setContextClassLoader(old);
}
}
代码示例来源:origin: org.springframework.osgi/spring-osgi-web
ClassLoader old = current.getContextClassLoader();
try {
current.setContextClassLoader(wac.getClassLoader());
wac.stop();
if (contexts != null) {
代码示例来源:origin: org.springframework.osgi/org.springframework.osgi.web
ClassLoader old = current.getContextClassLoader();
try {
current.setContextClassLoader(wac.getClassLoader());
wac.stop();
if (contexts != null) {
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
if (web_inf != null && web_inf.isDirectory() && _context.getClassLoader() instanceof WebAppClassLoader)
((WebAppClassLoader)_context.getClassLoader()).addClassPath(classes.toString());
((WebAppClassLoader)_context.getClassLoader()).addJars(lib);
代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server
if (getClassLoader()==null)
ClassLoader loader = getClassLoader();
Log.debug("Thread Context class loader is: " + loader);
loader=loader.getParent();
代码示例来源:origin: com.github.albfernandez.test-jsf/jsf-test-jetty
webXml = webAppContext.getResource(WEB_XML);
if (webXml == null || !webXml.exists()) {
URL dummyWebXml = webAppContext.getClassLoader().getResource(DUMMY_WEB_XML);
addResource(WEB_XML, dummyWebXml);
代码示例来源:origin: org.mortbay.jetty/jetty-annotations
finder.find(getWebAppContext().getClassLoader().getParent(), true, getWebAppContext().getInitParameter(__container_pattern), false,
new ClassNameResolver ()
finder.find (getWebAppContext().getClassLoader(), false, getWebAppContext().getInitParameter(__web_inf_pattern), true,
new ClassNameResolver()
内容来源于网络,如有侵权,请联系作者删除!