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

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

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

Dispatcher.getConfigurationManager介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

public class ActionMenuBuilderListener implements ServletContextListener,DispatcherListener {

  @Override
  public void contextInitialized(ServletContextEvent sce) {
    Dispatcher.addDispatcherListener(this);
  }

  @Override
  public void dispatcherInitialized(Dispatcher du) {
    Map<String, Map<String, ActionConfig>> runtimeActionConfigs = du
      .getConfigurationManager().getConfiguration().getRuntimeConfiguration()
      .getActionConfigs();
  }
  // other methods
}

代码示例来源:origin: org.apache.struts/struts2-convention-plugin

public void dispatcherInitialized(Dispatcher du) {
  du.getConfigurationManager().addContainerProvider(this);
}

代码示例来源:origin: org.apache.struts/struts2-spring-plugin

private void reload(File file) {
  if (classLoader != null) {
    LOG.debug("Change detected in file [{}], reloading class loader", file.getAbsolutePath());
    classLoader.reload();
    if (reloadConfig && Dispatcher.getInstance() != null) {
      LOG.debug("Change detected in file [{}], reloading configuration", file.getAbsolutePath());
      Dispatcher.getInstance().getConfigurationManager().reload();
    }
  }
}

代码示例来源:origin: org.apache.struts/struts2-junit-plugin

protected Dispatcher initDispatcher(Map<String, String> params) {
  Dispatcher du = StrutsTestCaseHelper.initDispatcher(servletContext, params);
  configurationManager = du.getConfigurationManager();
  configuration = configurationManager.getConfiguration();
  container = configuration.getContainer();
  return du;
}

代码示例来源:origin: org.apache.struts/struts2-junit-plugin

protected void tearDown() throws Exception {
  super.tearDown();
  // maybe someone else already destroyed Dispatcher
  if (dispatcher != null && dispatcher.getConfigurationManager() != null) {
    dispatcher.cleanup();
    dispatcher = null;
  }
  StrutsTestCaseHelper.tearDown();
}

代码示例来源:origin: com.atlassian/webwork-compat

ActionMapping mapping = actionMapper.getMapping(request, dispatcher.getConfigurationManager());
if (mapping == null) {
  try {

代码示例来源:origin: org.apache.struts/struts2-junit-plugin

protected Dispatcher initDispatcher(Map<String, String> params) {
  dispatcher = StrutsTestCaseHelper.initDispatcher(servletContext, params);
  configurationManager = dispatcher.getConfigurationManager();
  configuration = configurationManager.getConfiguration();
  container = configuration.getContainer();
  container.inject(dispatcher);
  return dispatcher;
}

代码示例来源:origin: org.apache.struts/struts2-junit-plugin

@After
public void tearDown() throws Exception {
  super.tearDown();
  if (dispatcher != null && dispatcher.getConfigurationManager() != null) {
    dispatcher.cleanup();
    dispatcher = null;
  }
  StrutsTestCaseHelper.tearDown();
}

代码示例来源:origin: org.apache.struts/struts2-testng-plugin

protected Dispatcher initDispatcher(Map<String,String> params) {
  Dispatcher du = StrutsTestCaseHelper.initDispatcher(new MockServletContext(), params);
  configurationManager = du.getConfigurationManager();
  configuration = configurationManager.getConfiguration();
  container = configuration.getContainer();
  return du;
}

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

@Override
public ActionMapping findActionMapping(HttpServletRequest request, HttpServletResponse response, boolean forceLookup) {
  ActionMapping mapping = (ActionMapping) request.getAttribute(STRUTS_ACTION_MAPPING_KEY);
  if (mapping == null || forceLookup) {
    try {
      Container container = this._dispatcher.getContainer();
      ActionMapper mapper = container.getInstance(ActionMapper.class);
      String entandoActionName = EntandoActionUtils.extractEntandoActionName(request);
      mapping = mapper.getMapping(request, this._dispatcher.getConfigurationManager());
      if (null != entandoActionName) {
        mapping.setName(entandoActionName);
      }
      if (mapping != null) {
        request.setAttribute(STRUTS_ACTION_MAPPING_KEY, mapping);
      }
    } catch (Exception ex) {
      this._dispatcher.sendError(request, response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex);
    }
  }
  return mapping;
}

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

@Override
public ActionMapping findActionMapping(HttpServletRequest request, HttpServletResponse response, boolean forceLookup) {
  ActionMapping mapping = (ActionMapping) request.getAttribute(STRUTS_ACTION_MAPPING_KEY);
  if (mapping == null || forceLookup) {
    try {
      Container container = this._dispatcher.getContainer();
      ActionMapper mapper = container.getInstance(ActionMapper.class);
      String entandoActionName = EntandoActionUtils.extractEntandoActionName(request);
      mapping = mapper.getMapping(request, this._dispatcher.getConfigurationManager());
      if (null != entandoActionName) {
        mapping.setName(entandoActionName);
      }
      if (mapping != null) {
        request.setAttribute(STRUTS_ACTION_MAPPING_KEY, mapping);
      }
    } catch (Exception ex) {
      this._dispatcher.sendError(request, response, this._servletContext, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex);
    }
  }
  return mapping;
}

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

@Override
public ActionMapping findActionMapping(HttpServletRequest request, HttpServletResponse response, boolean forceLookup) {
  ActionMapping mapping = (ActionMapping) request.getAttribute(STRUTS_ACTION_MAPPING_KEY);
  if (mapping == null || forceLookup) {
    try {
      Container container = this._dispatcher.getContainer();
      ActionMapper mapper = container.getInstance(ActionMapper.class);
      String entandoActionName = EntandoActionUtils.extractEntandoActionName(request);
      mapping = mapper.getMapping(request, this._dispatcher.getConfigurationManager());
      if (null != entandoActionName) {
        mapping.setName(entandoActionName);
      }
      if (mapping != null) {
        request.setAttribute(STRUTS_ACTION_MAPPING_KEY, mapping);
      }
    } catch (Exception ex) {
      this._dispatcher.sendError(request, response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, ex);
    }
  }
  return mapping;
}

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

Dispatcher dispatcher = prepare.getDispatcher();
String entandoActionName = EntandoActionUtils.extractEntandoActionName(request);
ActionMapping mapping = actionMapper.getMapping(request, dispatcher.getConfigurationManager());
if (mapping != null && null != entandoActionName && executeCustomAction) {
  mapping.setName(entandoActionName);

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

Dispatcher dispatcher = prepare.getDispatcher();
String entandoActionName = EntandoActionUtils.extractEntandoActionName(request);
ActionMapping mapping = actionMapper.getMapping(request, dispatcher.getConfigurationManager());
if (mapping != null && null != entandoActionName && executeCustomAction) {
  mapping.setName(entandoActionName);

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

Dispatcher dispatcher = prepare.getDispatcher();
String entandoActionName = EntandoActionUtils.extractEntandoActionName(request);
ActionMapping mapping = actionMapper.getMapping(request, dispatcher.getConfigurationManager());
if (mapping != null && null != entandoActionName && executeCustomAction) {
  mapping.setName(entandoActionName);

代码示例来源: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: com.googlecode.struts2-conversation/struts2-junit4-plugin

configurationManager = dispatcher.getConfigurationManager();
configuration = configurationManager.getConfiguration();
container = configuration.getContainer();

代码示例来源:origin: org.apache.struts/struts2-struts1-plugin

Struts1Factory strutsFactory = new Struts1Factory(Dispatcher.getInstance().getConfigurationManager().getConfiguration());
ActionMapping mapping = strutsFactory.createActionMapping(actionConfig);
HttpServletRequest request = ServletActionContext.getRequest();

相关文章