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

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

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

WebAppContext.setConfigurationClasses介绍

暂无

代码示例

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

public void setConfigurationClasses(List<String> configurations)
{
  setConfigurationClasses(configurations.toArray(new String[configurations.size()]));
}

代码示例来源:origin: gocd/gocd

private WebAppContext createWebAppContext() {
  webAppContext = new WebAppContext();
  webAppContext.setDefaultsDescriptor(GoWebXmlConfiguration.configuration(getWarFile()));
  webAppContext.setConfigurationClasses(new String[]{
      WebInfConfiguration.class.getCanonicalName(),
      WebXmlConfiguration.class.getCanonicalName(),
      JettyWebXmlConfiguration.class.getCanonicalName()
  });
  webAppContext.setContextPath(systemEnvironment.getWebappContextPath());
  // delegate all logging to parent classloader to avoid initialization of loggers in multiple classloaders
  webAppContext.addSystemClass("org.apache.log4j.");
  webAppContext.addSystemClass("org.slf4j.");
  webAppContext.addSystemClass("org.apache.commons.logging.");
  webAppContext.setWar(getWarFile());
  webAppContext.setParentLoaderPriority(systemEnvironment.getParentLoaderPriority());
  return webAppContext;
}

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

public void setConfigurationClasses(List<String> configurations)
{
  setConfigurationClasses(configurations.toArray(new String[configurations.size()]));
}

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

public void setConfigurationClasses(List<String> configurations)
{
  setConfigurationClasses(configurations.toArray(new String[configurations.size()]));
}

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

public void setConfigurationClasses(List<String> configurations)
{
  setConfigurationClasses(configurations.toArray(new String[configurations.size()]));
}

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

@Override
public void setServer(Server server)
{
  super.setServer(server);
  //if we haven't been given a set of configuration instances to
  //use, and we haven't been given a set of configuration classes
  //to use, use the configuration classes that came from the
  //Server (if there are any)
  if (!_configurationsSet && !_configurationClassesSet && server != null)
  {
    String[] serverConfigs = (String[])server.getAttribute(SERVER_CONFIG);
    if (serverConfigs != null)
      setConfigurationClasses(serverConfigs);
  }
}

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

@Override
public void setServer(Server server)
{
  super.setServer(server);
  //if we haven't been given a set of configuration instances to
  //use, and we haven't been given a set of configuration classes
  //to use, use the configuration classes that came from the
  //Server (if there are any)
  if (!_configurationsSet && !_configurationClassesSet && server != null)
  {
    String[] serverConfigs = (String[])server.getAttribute(SERVER_CONFIG);
    if (serverConfigs != null)
      setConfigurationClasses(serverConfigs);
  }
}

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

@Override
public void setServer(Server server)
{
  super.setServer(server);
  //if we haven't been given a set of configuration instances to
  //use, and we haven't been given a set of configuration classes
  //to use, use the configuration classes that came from the
  //Server (if there are any)
  if (!_configurationsSet && !_configurationClassesSet && server != null)
  {
    String[] serverConfigs = (String[])server.getAttribute(SERVER_CONFIG);
    if (serverConfigs != null)
      setConfigurationClasses(serverConfigs);
  }
}

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

String[] configurationClasses =
{
  "org.eclipse.jetty.webapp.WebInfConfiguration",
  "org.eclipse.jetty.webapp.WebXmlConfiguration",
  "org.eclipse.jetty.webapp.MetaInfConfiguration",
  "org.eclipse.jetty.webapp.FragmentConfiguration",
  "org.eclipse.jetty.plus.webapp.EnvConfiguration",
  "org.eclipse.jetty.webapp.JettyWebXmlConfiguration"
};
WebAppContext webapp = new WebAppContext();
webapp.setConfigurationClasses(configurationClasses);
webapp.setDescriptor("/path/to/webapp/WEB-INF/web.xml");
webapp.setContextPath("/");
webapp.setResourceBase("/path/to/webapp");
webapp.setClassLoader(Thread.currentThread().getContextClassLoader());

代码示例来源:origin: cd.connect.common/connect-runnable-war

context.setConfigurationClasses(getConfigurationClasses( preScanned ? JETTY_CONFIGURATION_CLASSES_PRESCANNED : JETTY_CONFIGURATION_CLASSES));

代码示例来源:origin: works.lmz.common/common-runnable-war

context.setConfigurationClasses(getConfigurationClasses(JETTY_CONFIGURATION_CLASSES));

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

if (_configurationClasses != null) 
  wah.setConfigurationClasses(_configurationClasses);

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

protected void initializeWebAppContextDefaults(WebAppContext webapp)
{
  if (_defaultsDescriptor != null)
    webapp.setDefaultsDescriptor(_defaultsDescriptor);
  webapp.setExtractWAR(_extractWars);
  webapp.setParentLoaderPriority(_parentLoaderPriority);
  if (_configurationClasses != null)
    webapp.setConfigurationClasses(_configurationClasses);
  if (_tempDirectory != null)
  {
    /* Since the Temp Dir is really a context base temp directory,
     * Lets set the Temp Directory in a way similar to how WebInfConfiguration does it,
     * instead of setting the WebAppContext.setTempDirectory(File).  
     * If we used .setTempDirectory(File) all webapps will wind up in the
     * same temp / work directory, overwriting each others work.
     */
    webapp.setAttribute(WebAppContext.BASETEMPDIR, _tempDirectory);
  }
}

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

if (useWebXml)
  webapp.setConfigurationClasses(WebAppContext.getDefaultConfigurationClasses());

代码示例来源:origin: org.sonatype.plexus/plexus-jetty7

webapp.setConfigurationClasses( configClasses );

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

if (_configurationClasses != null) 
  wah.setConfigurationClasses(_configurationClasses);

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

if (_configurationClasses != null) 
  wah.setConfigurationClasses(_configurationClasses);

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

wah.setConfigurationClasses(_configurationClasses);
if (_defaultsDescriptor!=null)
  wah.setDefaultsDescriptor(_defaultsDescriptor);

代码示例来源:origin: jetty-project/i-jetty

wah.setConfigurationClasses(getConfigurationClasses());

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

wctx.setConfigurationClasses(webappConfigurationClasses);

相关文章

WebAppContext类方法