本文整理汇总了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);
}