本文整理了Java中org.apache.catalina.startup.Tomcat.initWebappDefaults()
方法的一些代码示例,展示了Tomcat.initWebappDefaults()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tomcat.initWebappDefaults()
方法的具体详情如下:
包路径:org.apache.catalina.startup.Tomcat
类名称:Tomcat
方法名:initWebappDefaults
[英]Provide default configuration for a context. This is the programmatic equivalent of the default web.xml. TODO: in normal Tomcat, if default-web.xml is not found, use this method
[中]为上下文提供默认配置。这是默认web的编程等价物。xml。TODO:在正常的Tomcat中,如果默认为web。找不到xml,请使用此方法
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
@Override
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
initWebappDefaults((Context) event.getLifecycle());
}
}
}
代码示例来源:origin: org.jboss.arquillian.container/arquillian-tomcat-embedded-7
/**
* Override to apply the equivalent of the stock "$CATALINA_BASE/conf/web.xml" to contexts programmatically.
*/
@Override
protected synchronized void beforeStart() {
super.beforeStart();
((StandardContext) context).setJ2EEServer("Arquillian-" + UUID.randomUUID().toString());
Tomcat.initWebappDefaults(context);
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
initWebappDefaults((Context) event.getLifecycle());
}
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
@Override
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
initWebappDefaults((Context) event.getLifecycle());
}
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
initWebappDefaults((Context) event.getLifecycle());
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
initWebappDefaults((Context) event.getLifecycle());
}
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
initWebappDefaults((Context) event.getLifecycle());
}
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
initWebappDefaults((Context) event.getLifecycle());
}
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public void lifecycleEvent(LifecycleEvent event) {
if (Lifecycle.BEFORE_START_EVENT.equals(event.getType())) {
initWebappDefaults((Context) event.getLifecycle());
}
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Provide default configuration for a context. This is the programmatic
* equivalent of the default web.xml.
*
* TODO: in normal Tomcat, if default-web.xml is not found, use this
* method
*
* @param contextPath The context to set the defaults for
*/
public void initWebappDefaults(String contextPath) {
Container ctx = getHost().findChild(contextPath);
initWebappDefaults((Context) ctx);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Provide default configuration for a context. This is the programmatic
* equivalent of the default web.xml.
*
* TODO: in normal Tomcat, if default-web.xml is not found, use this
* method
*
* @param contextPath The context to set the defaults for
*/
public void initWebappDefaults(String contextPath) {
Container ctx = getHost().findChild(contextPath);
initWebappDefaults((Context) ctx);
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Provide default configuration for a context. This is the programmatic
* equivalent of the default web.xml.
*
* TODO: in normal Tomcat, if default-web.xml is not found, use this
* method
*
* @param contextPath The context to set the defaults for
*/
public void initWebappDefaults(String contextPath) {
Container ctx = getHost().findChild(contextPath);
initWebappDefaults((Context) ctx);
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Provide default configuration for a context. This is the programmatic
* equivalent of the default web.xml.
*
* TODO: in normal Tomcat, if default-web.xml is not found, use this
* method
*
* @param contextPath The context to set the defaults for
*/
public void initWebappDefaults(String contextPath) {
Container ctx = getHost().findChild(contextPath);
initWebappDefaults((Context) ctx);
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Provide default configuration for a context. This is the programmatic
* equivalent of the default web.xml.
*
* TODO: in normal Tomcat, if default-web.xml is not found, use this
* method
*
* @param contextPath The context to set the defaults for
*/
public void initWebappDefaults(String contextPath) {
Container ctx = getHost().findChild(contextPath);
initWebappDefaults((Context) ctx);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Provide default configuration for a context. This is the programmatic
* equivalent of the default web.xml.
*
* TODO: in normal Tomcat, if default-web.xml is not found, use this
* method
*
* @param contextPath The context to set the defaults for
*/
public void initWebappDefaults(String contextPath) {
Container ctx = getHost().findChild(contextPath);
initWebappDefaults((Context) ctx);
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Provide default configuration for a context. This is the programmatic
* equivalent of the default web.xml.
*
* TODO: in normal Tomcat, if default-web.xml is not found, use this
* method
*
* @param contextPath The context to set the defaults for
*/
public void initWebappDefaults(String contextPath) {
Container ctx = getHost().findChild(contextPath);
initWebappDefaults((Context) ctx);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Provide default configuration for a context. This is the programmatic
* equivalent of the default web.xml.
*
* TODO: in normal Tomcat, if default-web.xml is not found, use this
* method
*
* @param contextPath The context to set the defaults for
*/
public void initWebappDefaults(String contextPath) {
Container ctx = getHost().findChild(contextPath);
initWebappDefaults((Context) ctx);
}
代码示例来源:origin: apache/tomcat-maven-plugin
private void createStaticContext( final Tomcat container, Context context, Host host )
{
if ( staticContextDocbase != null )
{
Context staticContext = container.addContext( staticContextPath, staticContextDocbase );
Tomcat.initWebappDefaults(staticContext);
staticContext.setPrivileged( true );
Wrapper servlet = context.createWrapper();
servlet.setServletClass( DefaultServlet.class.getName() );
servlet.setName( "staticContent" );
staticContext.addChild( servlet );
staticContext.addServletMapping( "/", "staticContent" );
// see https://issues.apache.org/jira/browse/MTOMCAT-238
//host.addChild( staticContext );
}
}
代码示例来源:origin: apache/ofbiz-framework
Tomcat.initWebappDefaults(context);
内容来源于网络,如有侵权,请联系作者删除!