The problem with using the UserManager, it is not JSR 168.  The guide says
that I can use jetspeed-portlet.xml to map the jetspeed attributes to the
jsr 168 attributes, but it looks like the only way to get those attributes
is to use the user manager portlet to create them.


On 6/16/06, arker statis <[EMAIL PROTECTED]> wrote:

In jetspeed-portlet.xml did you use "? I've notice you have to use only '
to
delimit services name,
for example
    <js:services>
        <js:service name='ApplicationServerManager'/>
        <js:service name='DeploymentManager'/>
        <js:service name='EntityAccessor'/>
        <js:service name='GroupManager'/>
        <js:service name='PageManager'/>
        <js:service name='PermissionManager'/>
        <js:service name='PortalAdministration'/>
        <js:service name='PortletFactory'/>
        <js:service name='PortalAdministration'/>
        <js:service name='PortletRegistryComponent'/>
        <js:service name='PortalStatistics'/>
        <js:service name='Profiler' />
        <js:service name='RoleManager'/>
        <js:service name='SearchComponent'/>
        <js:service name='SSO' />
        <js:service name='UserManager'/>
    </js:services>
Then you can use UserManager to access user's data

On 6/15/06, Brice Lambi <[EMAIL PROTECTED]> wrote:
>
> I'm trying to get the user attributes, but the only way I can get it to
> work
> is by going into the user management portlet and manually adding a
value.
> I've read the guide at
> http://portals.apache.org/jetspeed-2/guides/guide-user-attributes.htmland
> added the jetspeed-portlet.xml to my app, but the attributes are still
> null.  There is a link on that page that is broken, it looks like it
would
> talk about jetspeed preferences, so I might be missing something.  I'm
> just
> trying to get the username of the current user.  Here is my
> jetspeed-portlet.xml
>
> <?xml version="1.0"?>
> <portlet-app version="1.0"
>    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";
>    xmlns:js="http://portals.apache.org/jetspeed";>
>    <js:user-attribute-ref>
>       <js:name>user-name</js:name>
>       <js:name-link>user.name</js:name-link>
>    </js:user-attribute-ref>
>    <js:user-attribute-ref>
>       <js:name>user-name-given</js:name>
>       <js:name-link>user.name.given</js:name-link>
>    </js:user-attribute-ref>
>    <js:user-attribute-ref>
>       <js:name>user-name-family</js:name>
>       <js:name-link>user.name.family</js:name-link>
>    </js:user-attribute-ref>
> </portlet-app>
>
>
> And I get the values with
>
> Map map = (Map)request.getAttribute(PortletRequest.USER_INFO);
> String username = (String)map.get("user.name");
>
> What am I doing wrong?
>
>


Reply via email to