本文整理了Java中org.apache.struts2.dispatcher.Dispatcher.sendError()
方法的一些代码示例,展示了Dispatcher.sendError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dispatcher.sendError()
方法的具体详情如下:
包路径:org.apache.struts2.dispatcher.Dispatcher
类名称: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;
}
内容来源于网络,如有侵权,请联系作者删除!