diff --git a/org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java b/org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java index c75b7f62693e7390f203e1c2448af815e0af5e78..7525f38ccd471d2694595dcf18d8b0a8af9279e5 100644 --- a/org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java +++ b/org.springframework.web.portlet/src/main/java/org/springframework/web/portlet/DispatcherPortlet.java @@ -1033,7 +1033,7 @@ public class DispatcherPortlet extends FrameworkPortlet { response.setRenderParameter(paramName, paramValues); } } - response.setRenderParameter(ACTION_EXCEPTION_RENDER_PARAMETER, Boolean.TRUE.toString()); + response.setRenderParameter(ACTION_EXCEPTION_RENDER_PARAMETER, ex.toString()); request.getPortletSession().setAttribute(ACTION_EXCEPTION_SESSION_ATTRIBUTE, ex); } diff --git a/org.springframework.web.portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java b/org.springframework.web.portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java index 1c3aafd31330b7e324d344cf9a19eef638163ffc..dec4b9e1cf375b1ddcd4258cff8390e9f50ea306 100644 --- a/org.springframework.web.portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java +++ b/org.springframework.web.portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,10 +46,14 @@ import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.core.Ordered; +import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.portlet.MockPortletConfig; import org.springframework.mock.web.portlet.MockPortletContext; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; import org.springframework.web.multipart.MaxUploadSizeExceededException; import org.springframework.web.multipart.MultipartException; +import org.springframework.web.multipart.MultipartFile; import org.springframework.web.portlet.bind.PortletRequestBindingException; import org.springframework.web.portlet.context.PortletRequestHandledEvent; import org.springframework.web.portlet.context.StaticPortletApplicationContext; @@ -67,8 +71,6 @@ import org.springframework.web.portlet.multipart.MultipartActionRequest; import org.springframework.web.portlet.multipart.PortletMultipartResolver; import org.springframework.web.portlet.mvc.Controller; import org.springframework.web.portlet.mvc.SimpleControllerHandlerAdapter; -import org.springframework.util.MultiValueMap; -import org.springframework.util.LinkedMultiValueMap; /** * @author Juergen Hoeller @@ -475,10 +477,10 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo throw new IllegalStateException("Already resolved"); } request.setAttribute("resolved", Boolean.TRUE); - MultiValueMap files = new LinkedMultiValueMap(); - files.set("someFile", "someFile"); - Map params = new HashMap(); - params.put("someParam", "someParam"); + MultiValueMap files = new LinkedMultiValueMap(); + files.set("someFile", new MockMultipartFile("someFile", "someContent".getBytes())); + Map params = new HashMap(); + params.put("someParam", new String[] {"someParam"}); return new DefaultMultipartActionRequest(request, files, params); }