java - Removing session attribute in jsp portlet issue in liferay -



java - Removing session attribute in jsp portlet issue in liferay -

after passing info portlet through session if want clear sessionattribute @ destination portlet doesn't work.

in destination portlet session attribute , clear it, after refreshing jsp page. session attribute still there. should null. how can rid of next code not working.

class="lang-jsp prettyprint-override"><%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <%@page import="javax.portlet.portletsession" %> <portlet:defineobjects /> <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>

overloaded method uses portlet_scope search object, need specify scope application_scope.

ps.removeattribute("sessionvalue", portletsession.application_scope);

java jsp session liferay portlet

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -