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

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

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

WebAppContext.setVirtualHosts介绍

暂无

代码示例

代码示例来源:origin: biezhi/java-library-examples

appA.setContextPath("/a");
appA.setWar("./src/main/wars/webapp-a.war");
appA.setVirtualHosts(new String[]{"@connA"});
contexts.addHandler(appA);
appB.setContextPath("/b");
appB.setWar("./src/main/wars/webapp-b.war");
appB.setVirtualHosts(new String[]{"@connB"});
contexts.addHandler(appB);

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

wah.setVirtualHosts(new String[]{virtual});
context = URIUtil.SLASH;

代码示例来源:origin: stackoverflow.com

appA.setContextPath("/samplePath");
appA.setWar("<warFilePath>");
appA.setVirtualHosts(new String[] { "@connA" }); // connector name A
contexts.addHandler(appA);

代码示例来源:origin: org.eclipse.jetty/jetty-deploy

webAppContext.setVirtualHosts(new String[]{virtual});
context = URIUtil.SLASH;

代码示例来源:origin: org.jboss.arquillian.container/arquillian-jetty-embedded-9

webAppContext.setVirtualHosts(new String[] { virtual });
context = URIUtil.SLASH;

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

wah.setVirtualHosts(new String[]{virtual});
context = URIUtil.SLASH;

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

wah.setVirtualHosts(new String[]{virtual});
context = URIUtil.SLASH;

代码示例来源:origin: org.mule.transports/mule-transport-jetty

@Override
  public ContextHandler createContextHandler(App app) throws Exception
  {
    WebAppContext webAppContext = (WebAppContext) super.createContextHandler(app);
    if (webappsConfiguration.getServerClasses() != null)
    {
      webAppContext.setServerClasses(webappsConfiguration.getServerClasses());
    }
    if (webappsConfiguration.getSystemClasses() != null)
    {
      webAppContext.setSystemClasses(webappsConfiguration.getSystemClasses());
    }
    File workDir = new File(muleContext.getConfiguration().getWorkingDirectory(),
                "_exploded_wars" + webAppContext.getContextPath());
    workDir.mkdirs();
    webAppContext.setTempDirectory(workDir);
    webAppContext.setAttribute(MULE_CONTEXT_ATTRIBUTE, muleContext);
    webAppContext.setVirtualHosts(new String[] {getVirtualHostName(jettyConnector)});
    if (logger.isInfoEnabled())
    {
      String msg = String.format("Will deploy a web app at %s://%s%s%s",
                    "http", jettyConnector.getHost(),
                    jettyConnector.getPort() == 80 ? StringUtils.EMPTY : ":" + jettyConnector.getPort(),
                    webAppContext.getContextPath());
      logger.info(StringMessageUtils.getBoilerPlate(msg, '*', 70));
    }
    return webAppContext;
  }
};

相关文章

WebAppContext类方法