本文整理汇总了Java中org.apache.catalina.Context.addParameter方法的典型用法代码示例。如果您正苦于以下问题:Java Context.addParameter方法的具体用法?Java Context.addParameter怎么用?Java Context.addParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.catalina.Context
的用法示例。
在下文中一共展示了Context.addParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: importDefaultContext
import org.apache.catalina.Context; //导入方法依赖的package包/类
/**
* Import the configuration from the DefaultContext into
* current Context.
*
* @param context current web application context
*/
public void importDefaultContext(Context context) {
if (context instanceof StandardContext) {
((StandardContext)context).setUseNaming(isUseNaming());
((StandardContext)context).setSwallowOutput(getSwallowOutput());
if (!contexts.containsKey(context)) {
((StandardContext) context).addLifecycleListener(this);
}
}
context.setCookies(getCookies());
context.setCrossContext(getCrossContext());
context.setReloadable(getReloadable());
String [] listeners = findApplicationListeners();
for( int i = 0; i < listeners.length; i++ ) {
context.addApplicationListener(listeners[i]);
}
listeners = findInstanceListeners();
for( int i = 0; i < listeners.length; i++ ) {
context.addInstanceListener(listeners[i]);
}
String [] wrapper = findWrapperListeners();
for( int i = 0; i < wrapper.length; i++ ) {
context.addWrapperListener(wrapper[i]);
}
wrapper = findWrapperLifecycles();
for( int i = 0; i < wrapper.length; i++ ) {
context.addWrapperLifecycle(wrapper[i]);
}
String [] parameters = findParameters();
for( int i = 0; i < parameters.length; i++ ) {
context.addParameter(parameters[i],findParameter(parameters[i]));
}
ApplicationParameter [] appParam = findApplicationParameters();
for( int i = 0; i < appParam.length; i++ ) {
context.addApplicationParameter(appParam[i]);
}
if (!(context instanceof StandardContext)) {
ContextEjb [] contextEjb = findEjbs();
for( int i = 0; i < contextEjb.length; i++ ) {
context.addEjb(contextEjb[i]);
}
ContextEnvironment [] contextEnv = findEnvironments();
for( int i = 0; i < contextEnv.length; i++ ) {
context.addEnvironment(contextEnv[i]);
}
/*
if (context instanceof StandardContext) {
ResourceParams [] resourceParams = findResourceParams();
for( int i = 0; i < resourceParams.length; i++ ) {
((StandardContext)context).addResourceParams
(resourceParams[i]);
}
}
*/
ContextResource [] resources = findResources();
for( int i = 0; i < resources.length; i++ ) {
context.addResource(resources[i]);
}
String [] envRefs = findResourceEnvRefs();
for( int i = 0; i < envRefs.length; i++ ) {
context.addResourceEnvRef
(envRefs[i],findResourceEnvRef(envRefs[i]));
}
}
}