org.apache.struts2.dispatcher.Dispatcher.init()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(126)

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

Dispatcher.init介绍

暂无

代码示例

代码示例来源:origin: entando/entando-core

@Override
public Dispatcher initDispatcher(HostConfig filterConfig) {
  Map<String, String> params = new HashMap<String, String>();
  for (Iterator<String> e = filterConfig.getInitParameterNames(); e.hasNext();) {
    String name = (String) e.next();
    String value = filterConfig.getInitParameter(name);
    params.put(name, value);
  }
  String struts2Config = filterConfig.getServletContext().getInitParameter(ApsAdminSystemConstants.STRUTS2_CONFIG_INIT_PARAM_NAME);
  if (null != struts2Config) {
    params.put("config", struts2Config);
  }
  Dispatcher dispatcher = new Dispatcher(filterConfig.getServletContext(), params);
  dispatcher.init();
  return dispatcher;
}

代码示例来源:origin: org.entando.entando/entando-admin-console

@Override
public Dispatcher initDispatcher(HostConfig filterConfig) {
  Map<String, String> params = new HashMap<String, String>();
  for (Iterator<String> e = filterConfig.getInitParameterNames(); e.hasNext();) {
    String name = (String) e.next();
    String value = filterConfig.getInitParameter(name);
    params.put(name, value);
  }
  String struts2Config = filterConfig.getServletContext().getInitParameter(ApsAdminSystemConstants.STRUTS2_CONFIG_INIT_PARAM_NAME);
  if (null != struts2Config) {
    params.put("config", struts2Config);
  }
  Dispatcher dispatcher = new Dispatcher(filterConfig.getServletContext(), params);
  dispatcher.init();
  return dispatcher;
}

代码示例来源:origin: org.entando.entando/entando-core-engine

@Override
public Dispatcher initDispatcher(HostConfig filterConfig) {
  Map<String, String> params = new HashMap<String, String>();
  for (Iterator<String> e = filterConfig.getInitParameterNames(); e.hasNext();) {
    String name = (String) e.next();
    String value = filterConfig.getInitParameter(name);
    params.put(name, value);
  }
  String struts2Config = filterConfig.getServletContext().getInitParameter(ApsAdminSystemConstants.STRUTS2_CONFIG_INIT_PARAM_NAME);
  if (null != struts2Config) {
    params.put("config", struts2Config);
  }
  Dispatcher dispatcher = new Dispatcher(filterConfig.getServletContext(), params);
  dispatcher.init();
  return dispatcher;
}

代码示例来源:origin: com.googlecode.struts2-conversation/struts2-junit4-plugin

protected Dispatcher initDispatcher(Map<String, String> params) {
  Dispatcher du = new Dispatcher(servletContext, params);
  du.init();
  Dispatcher.setInstance(du);
  ValueStack stack = ((ValueStackFactory) du.getContainer().getInstance(ValueStackFactory.class)).createValueStack();
  stack.getContext().put("com.opensymphony.xwork2.ActionContext.container", du.getContainer());
  ActionContext.setContext(new ActionContext(stack.getContext()));
  configurationManager = du.getConfigurationManager();
  configuration = configurationManager.getConfiguration();
  container = configuration.getContainer();
  return du;
}

代码示例来源:origin: entando/entando-core

Map params = new HashMap(props);
this.dispatcher = new Dispatcher(servletContext, params);
this.dispatcher.init();
Dispatcher.setInstance(this.dispatcher);

相关文章