PortletA集成MVCPortlet,写toEdit()方法调整到edit.jsp.
toEdit中使用actionRequest.setAttribute(“name”,“gjm”);
edit.jsp中通过request.getAttribute("name")无法获取。
最后发现,错误引起是liferay-portlet.xml中设置了<action-url-redirect>true</action-url-redirect>引起。删除该设置,jsp中可以获取值。
PortletA集成MVCPortlet,写toEdit()方法调整到edit.jsp.
toEdit中使用actionRequest.setAttribute(“name”,“gjm”);
edit.jsp中通过request.getAttribute("name")无法获取。
最后发现,错误引起是liferay-portlet.xml中设置了<action-url-redirect>true</action-url-redirect>引起。删除该设置,jsp中可以获取值。