You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by terry li <Sp...@sqatester.com> on 2003/12/01 02:32:39 UTC

Re: [Fwd: Re: PortletSession Lost!]

Hi, Stefan
   
     I did create an action link, and processAction was called too. but if i modify my code like this , then i can get the session:
---------------------------------------------------------------
                //PortletSession ps=request.getPortletSession(false);
 		PortletSession ps=request.getPortletSession();
 		
 		Object val=null;
 		
 		if(ps!=null){
 			val=ps.getAttribute("portal.user",PortletSession.APPLICATION_SCOPE);
 		}
---------------------------------------------------------------

    Any ideas??? thanks!

Terry




--- Stefan Hepper <st...@hursley.ibm.com> wrote:

did you also create an action link that you clicked?
if not, processAction was never called.

Stefan


terry li wrote:
> Hi , all , i got a question with Pluto
> 
> I create a session within processAction method like this:
> ----------------------------------------------------------
> 					PortletSession ps=((PortletRequest)request).getPortletSession();
> 					ps.setAttribute("portal.user","name",PortletSession.APPLICATION_SCOPE);
> ----------------------------------------------------------
> 
> but when i get it within doView() method with these lines:
> ----------------------------------------------------------
> 		PortletSession ps=request.getPortletSession(false);
> 		
> 		Object val=null;
> 		
> 		if(ps!=null){
> 			val=ps.getAttribute("portal.user",PortletSession.APPLICATION_SCOPE);
> 		}
> ----------------------------------------------------------
> I can only get a null. Why??  Is it Pluto's bug or me??
> Thanks for your great helP!
> I do appreciate this!
> 
> 
> Jia
> 
> _____________________________________________________________
> Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm
> 





_____________________________________________________________
Join SQAtester.com Community  ---> http://www.sqatester.com/testersarea/joinus.htm