本文整理了Java中org.mortbay.jetty.webapp.WebAppContext.start()
方法的一些代码示例,展示了WebAppContext.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.start()
方法的具体详情如下:
包路径:org.mortbay.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:start
暂无
代码示例来源:origin: feroult/yawp
private void restart(WebAppContext webapp) throws Exception {
webapp.stop();
configureClassloader();
webapp.start();
}
代码示例来源: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.jboss.errai/errai-cdi-jetty
@Override
public void refresh() throws UnableToCompleteException {
String msg = "Reloading web app to reflect changes in "
+ appRootDir.getAbsolutePath();
TreeLogger branch = logger.branch(TreeLogger.INFO, msg);
// Temporarily log Jetty on the branch.
Log.setLog(new JettyTreeLogger(branch));
try {
wac.stop();
server.stop();
wac.start();
server.start();
branch.log(TreeLogger.INFO, "Reload completed successfully");
}
catch (Exception e) {
branch.log(TreeLogger.ERROR, "Unable to restart embedded Jetty server",
e);
throw new UnableToCompleteException();
}
finally {
// Reset the top-level logger.
Log.setLog(new JettyTreeLogger(logger));
}
}
内容来源于网络,如有侵权,请联系作者删除!