renderURL可以通过 mvcPath来配置跳转。但是actionURL无效。想要实现后台方法执行完成后跳转 需要在后台方法的最后加入代码
actionResponse.setRenderParameter("jspPage","/html/userinfomanageraction/updateemail/new_email.jsp");
第二个参数为jsp文件的路径。这样既可实现mvcPortlet的actionURL执行完后台方法后的跳转
如果没有配置<action-url-redirect>true</action-url-redirect>
也可以这么写
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY); String portletName = (String)actionRequest.getAttribute(WebKeys.PORTLET_ID); PortletURL redirectURL = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(actionRequest), portletName, themeDisplay.getLayout().getPlid(), PortletRequest.RENDER_PHASE); redirectURL.setParameter("view", "abc"); actionResponse.sendRedirect(redirectURL.toString());