当前位置: 首页>>代码示例>>Java>>正文


Java StandardHost.setDebug方法代码示例

本文整理汇总了Java中org.apache.catalina.core.StandardHost.setDebug方法的典型用法代码示例。如果您正苦于以下问题:Java StandardHost.setDebug方法的具体用法?Java StandardHost.setDebug怎么用?Java StandardHost.setDebug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.catalina.core.StandardHost的用法示例。


在下文中一共展示了StandardHost.setDebug方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createHost

import org.apache.catalina.core.StandardHost; //导入方法依赖的package包/类
/**
 * Create, configure, and return a Host that will process all
 * HTTP requests received from one of the associated Connectors,
 * and directed to the specified virtual host.
 * <p>
 * After you have customized the properties, listeners, and Valves
 * for this Host, you must attach it to the corresponding Engine
 * by calling:
 * <pre>
 *   engine.addChild(host);
 * </pre>
 * which will also cause the Host to be started if the Engine has
 * already been started.  If this is the default (or only) Host you
 * will be defining, you may also tell the Engine to pass all requests
 * not assigned to another virtual host to this one:
 * <pre>
 *   engine.setDefaultHost(host.getName());
 * </pre>
 *
 * @param name Canonical name of this virtual host
 * @param appBase Absolute pathname to the application base directory
 *  for this virtual host
 *
 * @exception IllegalArgumentException if an invalid parameter
 *  is specified
 */
public Host createHost(String name, String appBase) {

    if (debug >= 1)
        logger.log("Creating host '" + name + "' with appBase '" +
                   appBase + "'");

    StandardHost host = new StandardHost();

    host.setAppBase(appBase);
    host.setDebug(debug);
    host.setName(name);

    return (host);

}
 
开发者ID:c-rainstorm,项目名称:jerrydog,代码行数:42,代码来源:Embedded.java


注:本文中的org.apache.catalina.core.StandardHost.setDebug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。