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

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

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

Dispatcher.sendError介绍

暂无

代码示例

代码示例来源: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: 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

@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;
}

相关文章