cancel
Showing results for 
Search instead for 
Did you mean: 

Share PortalComponentSession between two portal components

Former Member
0 Kudos

Hi,

I have two portal components in the same portal application. They are shown at same time for same user in two different iFrames.

<b>I want them to share the component session, and both have access to objects in the session.</b>

I instantiate an object in the first component and add it to component session. In the other Component I want to get it out of session and use it there.

I have given both components same groupID in the deployment descriptor, as described here:

<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/44/9a90788aa474a2e10000000a11466f/frameset.htm">http://help.sap.com/ (Other Guidelines)</a>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi flemin

You can use the application session instead of component session to access a bean/data in both components. As for as my knowledge is concerned if you put some data in component session that is stick to only that component.Please tru to use some other session which is common to both the components

regards

kalyan

Answers (1)

Answers (1)

Former Member
0 Kudos

<b>Use ServletSession instead of ComponentSession:</b>


HttpServletRequest servletRequest = componentRequest.getServletRequest();
HttpSession servletSession = servletRequest.getSession();

servletSession.setAttribute( Container.SESSION_ID , container );
Object o = servletSession.getAttribute( Container.SESSION_ID );