3
如果想要在目标portlet中清除那个sessionAttribute
但通过数据到另一个portlet,但不起作用。在liferay中删除jsp portlet中的会话属性问题
在目标portlet中,我获得会话属性并清除它,但在刷新JSP页面之后。会话属性仍然存在。它应该是null
。我如何摆脱这一点,因为下面的代码不工作。
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@page import="javax.portlet.PortletSession" %>
<portlet:defineObjects />
This is the <b>NewPPIPC</b> portlet in View mode.
<%
PortletSession ps = renderRequest.getPortletSession();
String qString = (String)ps.getAttribute("sessionValue",PortletSession.APPLICATION_SCOPE);
ps.removeAttribute("sessionValue");
%>
<h1><%=qString %></h1>