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 治 王 <wz...@yahoo.com.cn> on 2005/06/13 11:53:18 UTC

Problem get UserManager

i write a portlet like :

public class MyPortlet extends GenericServletPortlet
{
   ...
    super.init(config);
        userManager = (UserManager)
getPortletContext().getAttribute(
               
CommonPortletServices.CPS_USER_MANAGER_COMPONENT);
   ...
}

the portlet deployed as war, but the userManager is
null, why? it's looks like no difference with the
UserBrowse portlet in java file and portlet.xml. Need
any other configure? 

__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

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


Re: Problem get UserManager

Posted by Liao jian <ji...@gmail.com>.
Hi, 
You must config a Jetspeed 2 Service in the extension config file 
jetspeed-portlet.xml like the following:

<portlet-app id="security" version="1.0" 
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" 
xmlns:js="http://portals.apache.org/jetspeed" 
xmlns:dc="http://www.purl.org/dc">

<dc:title>Security Portlets</dc:title>
<dc:title xml:lang="en">Security Portlets</dc:title>
<dc:creator>J2 Team</dc:creator>

<portlet>
<portlet-name>LoginPortlet</portlet-name>
<dc:title>Login Portlet</dc:title>
<dc:creator>J2 Team</dc:creator>
</portlet>

<js:services>
<js:service name='UserManager'/>
<js:service name='RoleManager'/>
<js:service name='GroupManager'/> 
<js:service name="Profiler" /> 
<js:service name="SSO" /> 
<js:service name='PortletRegistryComponent'/>
</js:services>

</portlet-app>

You should take a look at the bundled security portlet application for a 
detail.

- James Liao

On 6/13/05, 治 王 <wz...@yahoo.com.cn> wrote:
> 
> i write a portlet like :
> 
> public class MyPortlet extends GenericServletPortlet
> {
> ...
> super.init(config);
> userManager = (UserManager)
> getPortletContext().getAttribute(
> 
> CommonPortletServices.CPS_USER_MANAGER_COMPONENT);
> ...
> }
> 
> the portlet deployed as war, but the userManager is
> null, why? it's looks like no difference with the
> UserBrowse portlet in java file and portlet.xml. Need
> any other configure?
> 
> __________________________________________________
> 赶快注册雅虎超大容量免费邮箱?
> http://cn.mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
>