Re: Accessing Servlet Session Attribute inside a Portlet - Websphere

This is a discussion on Re: Accessing Servlet Session Attribute inside a Portlet - Websphere ; Jim, This apporoach did not work as mentioned from the post. When putting object "Test" in httpsession, where there is no visibility of PortletSession, how can we get the "Test" from PortletSession.Application_scope. Let me know if you have any idea ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Re: Accessing Servlet Session Attribute inside a Portlet

  1. Re: Accessing Servlet Session Attribute inside a Portlet

    Jim,

    This apporoach did not work as mentioned from the post. When putting object "Test" in httpsession, where there is no visibility of PortletSession, how can we get the "Test" from PortletSession.Application_scope. Let me know if you have any idea how to achieve this.



    Servlet------- doGet()

    **********************

    HttpSession session= request.getSession();

    session.setAttribute("Test", "Test");



    ******************************************

    Portlet--------doView()

    ******************************************

    request.getPortletSession().getAttribute("Test", PortletSession.APPLICATION_SCOPE)

  2. Re: Accessing Servlet Session Attribute inside a Portlet

    are they in the same web app?



    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  3. Re: Accessing Servlet Session Attribute inside a Portlet

    Nope. They won't be in same webapp. We want to make sure it has to be access for personalization engine and also for Content management.


    Let me know both the solutions. If they are in same web App and if they are in different web app.


    Scenerio is : When the user logins, Siteminder validates the validation part and will be directed to our portal.

    So LoginUserAuth will be triggered and we make a service call and populate a object.



    So this object should be visible to all applications in our portal. At LoginUserAuth level, we have access to httpsession object only and not portlet session. The portal can also have Web Content Management too.



    In dopostlogin method of LoginUserAuth ,rundata object has only access to httpsession object.

    So wondering how do we pass these object.

  4. Re: Accessing Servlet Session Attribute inside a Portlet

    if they are not in the same web app then they cannot use application scope.



    you would need to use some other method for sharing the data.

    This method has been used often

    http://www-128.ibm.com/developerwork...02_hepper.html





    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

  5. Re: Accessing Servlet Session Attribute inside a Portlet

    If i understand, that link is for sharing data across IBM portlet / JSR 168.

    Can we apply the same logic at LoginUserAuthLevel too (which does not have visibility for portletSession).

    How can we apply at LoginUserAuthLevel.

    Thanks

  6. Re: Accessing Servlet Session Attribute inside a Portlet

    yes and instead of passing in the portletsession just pass in the sessionid, customers have used it to share data between the jsps and the portlets





    IBM Certified System Administrator -- WebSphere Portal V6.0, V5.1, V5.0

    IBM Certified Solution Developer -- WebSphere Portal V5.1, v6.0



    The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM

+ Reply to Thread