Browse Source

do not check for action exception in resource phase (SPR-6129)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1944 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Juergen Hoeller 17 years ago
parent
commit
65c6ec8a82
  1. 23
      org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java

23
org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java

@ -586,7 +586,7 @@ public class DispatcherPortlet extends FrameworkPortlet { @@ -586,7 +586,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
* @throws BeansException if initialization failed
* @see org.springframework.context.ApplicationContext#getAutowireCapableBeanFactory()
*/
protected Object createDefaultStrategy(ApplicationContext context, Class clazz) throws BeansException {
protected Object createDefaultStrategy(ApplicationContext context, Class<?> clazz) throws BeansException {
return context.getAutowireCapableBeanFactory().createBean(clazz);
}
@ -700,7 +700,7 @@ public class DispatcherPortlet extends FrameworkPortlet { @@ -700,7 +700,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
int interceptorIndex = -1;
try {
ModelAndView mv = null;
ModelAndView mv;
try {
// Check for forwarded exception from the action phase
PortletSession session = request.getPortletSession(false);
@ -806,23 +806,8 @@ public class DispatcherPortlet extends FrameworkPortlet { @@ -806,23 +806,8 @@ public class DispatcherPortlet extends FrameworkPortlet {
int interceptorIndex = -1;
try {
ModelAndView mv = null;
ModelAndView mv;
try {
// Check for forwarded exception from the action phase
PortletSession session = request.getPortletSession(false);
if (session != null) {
if (request.getParameter(ACTION_EXCEPTION_RENDER_PARAMETER) != null) {
Exception ex = (Exception) session.getAttribute(ACTION_EXCEPTION_SESSION_ATTRIBUTE);
if (ex != null) {
logger.debug("Render phase found exception caught during action phase - rethrowing it");
throw ex;
}
}
else {
session.removeAttribute(ACTION_EXCEPTION_SESSION_ATTRIBUTE);
}
}
// Determine handler for the current request.
mappedHandler = getHandler(request, false);
if (mappedHandler == null || mappedHandler.getHandler() == null) {
@ -1063,7 +1048,7 @@ public class DispatcherPortlet extends FrameworkPortlet { @@ -1063,7 +1048,7 @@ public class DispatcherPortlet extends FrameworkPortlet {
* @throws Exception if there's a problem rendering the view
*/
protected void render(ModelAndView mv, PortletRequest request, MimeResponse response) throws Exception {
View view = null;
View view;
if (mv.isReference()) {
// We need to resolve the view name.
view = resolveViewName(mv.getViewName(), mv.getModelInternal(), request);

Loading…
Cancel
Save