I read that you cannot share data in session between two different war files.
I don't know if this explained it - I never tried anyway.
Sharing session data indeed only works for portlets and servlets bundled in the same web application (war file).
I think the problem here is that the name of the param is namespaced for the portlet so if you set a param called "foo" in the portlet session, you cannot access it using just "foo" in the servlet. Please look at the servlet specification for the namespace format.
So, in short what is the name space chosen by jboss portal to register parameters in the global session?
Try using APPLICATION SCOPE to retrieve the session attribute in your portlet code.
Thanks. I had started using the APPLICATION_SCOPE and it worked.
How I can access the session attribute value ( set using
renderRequest.setAttribute("MainCommand", renderRequest.getPortletSession().getAttribute("commandType", PortletSession.APPLICATION_SCOPE));) from jsp page