gpt4 book ai didi

org.mortbay.xml.XmlConfiguration.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-24 12:59:05 28 4
gpt4 key购买 nike

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

XmlConfiguration.<init>介绍

[英]Constructor.
[中]建造师。

代码示例

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

/**
 * Create a WebAppContext for the webapp being hot deployed, then apply the
 * xml config file to it to configure it.
 * 
 * @param filename
 *            the config file found in the hot deploy directory
 * @return
 * @throws Exception
 */
private ContextHandler createContext(String filename) throws Exception
{
  // The config file can call any method on WebAppContext to configure
  // the webapp being deployed.
  File hotDeployXmlFile=new File(filename);
  if (!hotDeployXmlFile.exists())
    return null;
  XmlConfiguration xmlConfiguration=new XmlConfiguration(hotDeployXmlFile.toURL());
  HashMap properties = new HashMap();
  properties.put("Server", _contexts.getServer());
  if (_configMgr!=null)
    properties.putAll(_configMgr.getProperties());
      xmlConfiguration.setProperties(properties);
  ContextHandler context=(ContextHandler)xmlConfiguration.configure();
  return context;
}

代码示例来源:origin: feroult/yawp

protected WebAppContext createWebAppContext() {
  try {
    Resource jettyEnv = Resource.newResource(String.format("%s/WEB-INF/jetty-env.xml", mojo.getAppDir()));
    XmlConfiguration conf = new XmlConfiguration(jettyEnv.getInputStream());
    WebAppContext webapp = (WebAppContext) conf.configure();
    webapp.setWar(mojo.getAppDir());
    System.setProperty("java.naming.factory.url.pkgs", "org.mortbay.naming");
    System.setProperty("java.naming.factory.initial", "org.mortbay.naming.InitialContextFactory");
    return webapp;
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
}

代码示例来源:origin: apache/chukwa

public void run() {
 server = new Server();
 XmlConfiguration configuration;
 try {
  configuration = new XmlConfiguration(serverConf);
  configuration.configure(server);
  server.start();
 } catch (Exception e) {
  log.error(ExceptionUtil.getStackTrace(e));
 }     
}

代码示例来源:origin: org.mortbay.jetty/jetty-embedded

XmlConfiguration configuration = new XmlConfiguration(server_config); 
configuration.configure(server);
configuration = new XmlConfiguration(context_config); 
ContextHandler context = (ContextHandler)configuration.configure();

代码示例来源:origin: eclipse-jetty/eclipse-jetty-plugin

XmlConfiguration configuration = new XmlConfiguration(in);

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

new XmlConfiguration( tempJettyXml.toURL() ).configure( server );

代码示例来源:origin: apache/chukwa

XmlConfiguration configuration;
try {
 configuration = new XmlConfiguration(serverConf);
 configuration.configure(server);
 server.start();

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

XmlConfiguration configuration = new XmlConfiguration(Resource.newResource(args[i]).getURL());
if (last!=null)
  configuration.getIdMap().putAll(last.getIdMap());

代码示例来源:origin: org.mortbay.jetty/com.springsource.org.mortbay.jetty.server

if(Log.isDebugEnabled())
  Log.debug("Configure: "+jetty);
XmlConfiguration jetty_config=new XmlConfiguration(jetty.getURL());
jetty_config.configure(getWebAppContext());

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com