org.eclipse.jetty.webapp.WebAppContext.setThrowUnavailableOnStartupException()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.setThrowUnavailableOnStartupException()方法的一些代码示例,展示了WebAppContext.setThrowUnavailableOnStartupException()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.setThrowUnavailableOnStartupException()方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:setThrowUnavailableOnStartupException

WebAppContext.setThrowUnavailableOnStartupException介绍

暂无

代码示例

代码示例来源:origin: Dreampie/Resty

webAppContext.setThrowUnavailableOnStartupException(true);

代码示例来源:origin: org.springframework.boot/spring-boot

initializersToUse);
context.setConfigurations(configurations);
context.setThrowUnavailableOnStartupException(true);
configureSession(context);
postProcessWebAppContext(context);

代码示例来源:origin: org.avaje.glue/jetty-runner

/**
 * Construct reading appropriate system properties.
 */
BaseRunner() {
 this.httpPort = Integer.getInteger(WEBAPP_HTTP_PORT, DEFAULT_HTTP_PORT);
 this.contextPath = System.getProperty(WEBAPP_CONTEXT_PATH, DEFAULT_CONTEXT_PATH);
 this.secureCookies = Boolean.parseBoolean(System.getProperty(WEBAPP_SECURE_COOKIES, "true"));
 this.webapp = new WebAppContext();
 webapp.setThrowUnavailableOnStartupException(true);
}

代码示例来源:origin: com.thoughtworks.inproctester/inproctester-jetty

private WebAppContext createWebAppContext(String webApp, String contextPath) {
  WebAppContext context = new WebAppContext();
  context.setWar(webApp);
  context.setContextPath(contextPath);
  context.setParentLoaderPriority(true);
  context.setThrowUnavailableOnStartupException(true);
  return context;
}

代码示例来源:origin: aharin/inproctester

private static ServletContextHandler createWebAppContext(String webApp, String contextPath) {
  WebAppContext context = new WebAppContext();
  context.setWar(webApp);
  context.setContextPath(contextPath);
  context.setParentLoaderPriority(true);
  context.setThrowUnavailableOnStartupException(true);
  return context;
}

代码示例来源:origin: tech.rsqn.useful-things/embedded-jetty

context.setContextPath(contextPath);
context.setParentLoaderPriority(true);
context.setThrowUnavailableOnStartupException(true);
server.setHandler(context);

代码示例来源:origin: fabric8io/jube

private static void createWebapp(HandlerCollection handlers, Set<String> foundURLs, Integer port, String war) {
  if (foundURLs.add(war)) {
    String contextPath = createContextPath(war);
    String filePath = createFilePath(war);
    if (contextPath.equals("hawtio")) {
      System.out.println();
      System.out.println("==================================================");
      System.out.println("hawtio is running on http://" + ApiMasterService.getHostName() + ":" + port + "/" + contextPath + "/");
      System.out.println("==================================================");
      System.out.println();
      hawtioEnabled = true;
    } else {
      System.out.println("adding web context path: /" + contextPath + " war: " + filePath);
    }
    WebAppContext webapp = new WebAppContext();
    webapp.setContextPath("/" + contextPath);
    webapp.setWar("file://" + filePath);
    handlers.addHandler(webapp);
    webapp.setThrowUnavailableOnStartupException(true);
    try {
      System.out.println("Starting web app: " + contextPath);
      webapp.start();
      System.out.println("Started web app: " + contextPath + " without any exceptions!");
    } catch (Throwable e) {
      logException(e);
    }
  }
}

代码示例来源:origin: apache/axis2-java

context.setContextPath("/axis2");
context.setParentLoaderPriority(true);
context.setThrowUnavailableOnStartupException(true);

代码示例来源:origin: org.leapframework/leap-webunit

context.setServer(server);
context.setErrorHandler(errorHandler);
context.setThrowUnavailableOnStartupException(true);

代码示例来源:origin: rancher/cattle

context.setThrowUnavailableOnStartupException(true);

代码示例来源:origin: org.leapframework/leap-webunit

public TWebServer duplicateContext(String existsContextPath,String duplicateContextPath) throws IllegalStateException{
  WebAppContext context = contexts.get(existsContextPath);
  
  if(null == context){
    throw new IllegalStateException("The given argument [existsContextPath] '" + existsContextPath + "' not exists");
  }
  
  if(contexts.containsKey(duplicateContextPath)){
    throw new IllegalStateException("The given argument [duplicateContextPath] '" + duplicateContextPath + "' aleady exists");
  }
  
  WebAppContext duplicateContext = new WebAppContext();
  duplicateContext.setContextPath(duplicateContextPath);
  duplicateContext.setClassLoader(context.getClassLoader());
  duplicateContext.setParentLoaderPriority(context.isParentLoaderPriority());
  duplicateContext.setServer(server);
  duplicateContext.setErrorHandler(context.getErrorHandler());
  duplicateContext.setBaseResource(context.getBaseResource());
  duplicateContext.setThrowUnavailableOnStartupException(context.isThrowUnavailableOnStartupException());
  contexts.put(duplicateContextPath, duplicateContext);
  
  return this;
}

代码示例来源:origin: com.github.sogyf/goja-jfinal

server.addConnector(connector);
webApp = new WebAppContext();
webApp.setThrowUnavailableOnStartupException(true);	// 在启动过程中允许抛出异常终止启动并退出 JVM
webApp.setContextPath(context);

代码示例来源:origin: com.cybermkd/ICEREST

server.addConnector(connector);
webApp = new WebAppContext();
webApp.setThrowUnavailableOnStartupException(true);    // 在启动过程中允许抛出异常终止启动并退出 JVM
webApp.setContextPath(context);

代码示例来源:origin: kumuluz/kumuluzee

appContext.setThrowUnavailableOnStartupException(serverConfig.getForwardStartupException());

代码示例来源:origin: T-baby/ICERest

server.addConnector(connector);
webApp = new WebAppContext();
webApp.setThrowUnavailableOnStartupException(true);    // 在启动过程中允许抛出异常终止启动并退出 JVM
webApp.setContextPath(context);

代码示例来源:origin: jenkinsci/winstone

wac.setThrowUnavailableOnStartupException(true);    // if boot fails, abort the process instead of letting empty Jetty run
wac.setMimeTypes(mimeTypes);
wac.getSessionHandler().setSessionTrackingModes(Collections.singleton(SessionTrackingMode.COOKIE));

代码示例来源:origin: com.jfinal/jetty-server

webApp.setThrowUnavailableOnStartupException(true);	// 在启动过程中允许抛出异常终止启动并退出 JVM
webApp.setContextPath(context);

相关文章

WebAppContext类方法