You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Tushar Kapadi <tk...@serenecorp.com> on 2006/06/23 21:00:27 UTC

retriving organization info

Hello,

We have a third party application. That application needs the input from
the Jetspeed portal. We need to pass username, manager name,
organization to the struts based portlet from the portal.

We have created a portlet class which we are calling from Portlet.xml
file. In this portlet class we are do following:

request.getPortletSession().setAttribute("loggedUser",request.getUserPri
ncipal().getName(),PortletSession.APPLICATION_SCOPE);
            
This gives us the logged user name. 

Question is, how to get the other information? How to get the
organization and supervisor?

We tried doing following in the same portlet class but it is returning
null...
userManager = (UserManager) getPortletContext().getAttribute(
CommonPortletServices.CPS_USER_MANAGER_COMPONENT);

Any help would be really appreciated.

Thanks,
--Tushar

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


RE: retriving organization info

Posted by Susheel Choudhari <sc...@serenecorp.com>.
I have created the Jetspeed-portlet.xml similar to the one present in j2-admin.

Now when I try to get the UserManager I get null

userManager = (UserManager) getPortletContext().getAttribute(               CommonPortletServices.CPS_USER_MANAGER_COMPONENT);


Am I missing any other configuration?

Thanks
Susheel

 

________________________________

From: Brice Lambi [mailto:bricelambi@gmail.com]
Sent: Fri 6/23/2006 12:21 PM
To: Jetspeed Users List
Subject: Re: retriving organization info



Try creating jetspeed-portlet.xml and add the UserManager entry.  Like this:

<portlet-app>
 <js:services>
       <js:service name='UserManager'/>
   </js:services>
</portlet-app>


On 6/23/06, Tushar Kapadi <tkapadi@serenecorp.com > wrote:
>
> Hello,
>
> We have a third party application. That application needs the input from
> the Jetspeed portal. We need to pass username, manager name,
> organization to the struts based portlet from the portal.
>
> We have created a portlet class which we are calling from Portlet.xml
> file. In this portlet class we are do following:
>
> request.getPortletSession().setAttribute("loggedUser",request.getUserPri
> ncipal().getName(),PortletSession.APPLICATION_SCOPE);
>
> This gives us the logged user name.
>
> Question is, how to get the other information? How to get the
> organization and supervisor?
>
> We tried doing following in the same portlet class but it is returning
> null...
> userManager = (UserManager) getPortletContext().getAttribute(
> CommonPortletServices.CPS_USER_MANAGER_COMPONENT );
>
> Any help would be really appreciated.
>
> Thanks,
> --Tushar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>



RE: retriving organization info

Posted by Tushar Kapadi <tk...@serenecorp.com>.
Brice,

Thanks for your help. After deleting the context file from Catalina &
applying your changes made it work.

Thanks,
--Tushar

-----Original Message-----
From: Tushar Kapadi [mailto:tkapadi@serenecorp.com] 
Sent: Friday, June 23, 2006 12:52 PM
To: Jetspeed Users List
Subject: RE: retriving organization info

Brice,

I did create that file under myapplication\web-inf foler but still I m
receiving null.

--Tushar

-----Original Message-----
From: Brice Lambi [mailto:bricelambi@gmail.com] 
Sent: Friday, June 23, 2006 12:22 PM
To: Jetspeed Users List
Subject: Re: retriving organization info

Try creating jetspeed-portlet.xml and add the UserManager entry.  Like
this:

<portlet-app>
 <js:services>
       <js:service name='UserManager'/>
   </js:services>
</portlet-app>


On 6/23/06, Tushar Kapadi <tkapadi@serenecorp.com > wrote:
>
> Hello,
>
> We have a third party application. That application needs the input
from
> the Jetspeed portal. We need to pass username, manager name,
> organization to the struts based portlet from the portal.
>
> We have created a portlet class which we are calling from Portlet.xml
> file. In this portlet class we are do following:
>
>
request.getPortletSession().setAttribute("loggedUser",request.getUserPri
> ncipal().getName(),PortletSession.APPLICATION_SCOPE);
>
> This gives us the logged user name.
>
> Question is, how to get the other information? How to get the
> organization and supervisor?
>
> We tried doing following in the same portlet class but it is returning
> null...
> userManager = (UserManager) getPortletContext().getAttribute(
> CommonPortletServices.CPS_USER_MANAGER_COMPONENT );
>
> Any help would be really appreciated.
>
> Thanks,
> --Tushar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


RE: retriving organization info

Posted by Tushar Kapadi <tk...@serenecorp.com>.
Brice,

I did create that file under myapplication\web-inf foler but still I m
receiving null.

--Tushar

-----Original Message-----
From: Brice Lambi [mailto:bricelambi@gmail.com] 
Sent: Friday, June 23, 2006 12:22 PM
To: Jetspeed Users List
Subject: Re: retriving organization info

Try creating jetspeed-portlet.xml and add the UserManager entry.  Like
this:

<portlet-app>
 <js:services>
       <js:service name='UserManager'/>
   </js:services>
</portlet-app>


On 6/23/06, Tushar Kapadi <tkapadi@serenecorp.com > wrote:
>
> Hello,
>
> We have a third party application. That application needs the input
from
> the Jetspeed portal. We need to pass username, manager name,
> organization to the struts based portlet from the portal.
>
> We have created a portlet class which we are calling from Portlet.xml
> file. In this portlet class we are do following:
>
>
request.getPortletSession().setAttribute("loggedUser",request.getUserPri
> ncipal().getName(),PortletSession.APPLICATION_SCOPE);
>
> This gives us the logged user name.
>
> Question is, how to get the other information? How to get the
> organization and supervisor?
>
> We tried doing following in the same portlet class but it is returning
> null...
> userManager = (UserManager) getPortletContext().getAttribute(
> CommonPortletServices.CPS_USER_MANAGER_COMPONENT );
>
> Any help would be really appreciated.
>
> Thanks,
> --Tushar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: retriving organization info

Posted by Brice Lambi <br...@gmail.com>.
Try creating jetspeed-portlet.xml and add the UserManager entry.  Like this:

<portlet-app>
 <js:services>
       <js:service name='UserManager'/>
   </js:services>
</portlet-app>


On 6/23/06, Tushar Kapadi <tkapadi@serenecorp.com > wrote:
>
> Hello,
>
> We have a third party application. That application needs the input from
> the Jetspeed portal. We need to pass username, manager name,
> organization to the struts based portlet from the portal.
>
> We have created a portlet class which we are calling from Portlet.xml
> file. In this portlet class we are do following:
>
> request.getPortletSession().setAttribute("loggedUser",request.getUserPri
> ncipal().getName(),PortletSession.APPLICATION_SCOPE);
>
> This gives us the logged user name.
>
> Question is, how to get the other information? How to get the
> organization and supervisor?
>
> We tried doing following in the same portlet class but it is returning
> null...
> userManager = (UserManager) getPortletContext().getAttribute(
> CommonPortletServices.CPS_USER_MANAGER_COMPONENT );
>
> Any help would be really appreciated.
>
> Thanks,
> --Tushar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>