Migrating to Websphere Portal 6.1,PortletSession

Another issue I faced is while to get the PortletSession. This I couldn't solve . But I got another solution and i was happy as long as it worked. (..But still trying)I was trying to get PortletSession like,

PortletSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);

Here I got java.lang.ClassCastException: com.ibm.ws.session.HttpSessionFacade incompatible with javax.portlet.PortletSession

PortletSession i need to store some user attributes.Tried different options,but noting worked. So decided to go like,

FacesContext.getCurrentInstance().getExternalContext().getSessionMap()

Now I'm putting my user related attribted in this SessionMap.

No comments:

Post a Comment