Register / Login
Win a copy of
Java Mock Exams (software)
this week in the
Programmer Certification (OCPJP)
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Portals and Portlets
retrieving Data from Portal Session
posted 8 years ago
Normally in a
, to retrieve a session to list all the attributes in that session i would do
I used this in my portal page and i am getting an exception "Cannot resolve symbol:variable session"
I am using websphere portal v6. Any suggestion would be welcome on how to retrieve portal Session
Cameron Wallace McKenzie
author and cow tipper
posted 8 years ago
I grabbed the code below from one of my free portlet development tutorials. You
check it out - it uses IRAD and deploys to WebSphere:
WebSphere Portlet Development Tutorials and JSR168 Code Samples
One thing you'll want to do is ensure that the session is available on the page with
in the page directive:
<%@ page session="true" contentType="text/html" %>
From there, you'll want to use the <portlet
efineObjects/> tag to make the portal variables available to the page.
And from there, you want to be using the portletSession in your JSPs, not the HttpSession.
<%@ page session="true" contentType="text/html" %> <%@taglib uri="http://java.sun.com/portlet" prefix="portlet"%> <portlet :mrgreen: efineObjects/> <B>Welcome to this simple JSP<B><BR> We did some snooping on you.<BR> This is what we learned about your browser:<I> <%=renderRequest.getProperty("user-agent")%> </I><BR> And we know what language you speak, it's: <I> <%=renderRequest.getLocale().getDisplayLanguage()%> </I>
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
Boost this thread!
Retreiving atrributes from HttpSession in Portlet
enable DWR access to Portal Session data - WebSphere Portal 6.x
Websphere portal and SUNONE8 session
Link/include another portal from my portal
Websphere Portal question