[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: sorting search results using JNDI?



hi,
some of the controls are standart such as sort. but still support for
controls is changing from vendor to vendor.
my code works fine with netscape ds.
regards
orhan alkan

-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of
mcgarrobo@soluziona.com
Sent: Thursday, April 26, 2001 10:30 AM
To: orhan alkan
Cc: openldap-software@OpenLDAP.org
Subject: RE: sorting search results using JNDI?




Thank you. But I am using OpenLdap and I think that the controls are for
Netscape Directory Server.
I will try to use some functions of Java.

Thank you.





"orhan alkan" <orhan@anet.net.tr> con fecha 25/04/2001 22:45:28






 Destinatarios: Maria del Carmen Garrobo
                Granados/Soluziona Servicios
                Internet/GUF@UnionFenosa,
                openldap-software@OpenLDAP.org

 CC:






 Asunto:    RE: sorting search results using JNDI?






hi,
you need to use controls in your context.
here is the sample;

            LdapContext ctx = new InitialLdapContext(env,null);

               Control[] ctxCtls = new
trol[]{
                    new SortControl(new String[]{"cn"}, Control.CRITICAL) };
               // set request control active
               ctx.setRequestControls(ctxCtls);

regards
orhan alkan
-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of
mcgarrobo@soluziona.com
Sent: Wednesday, April 25, 2001 6:11 PM
To: openldap-software@OpenLDAP.org
Subject: sorting search results using JNDI?




Hello,

I am making use of JNDI to perform a search on my LDAP directory. But  I
would
like to be able to sort them
before displaying the results using one of the attributes. Does anyone know
how
to achieve this?
I am using DirContext.search() to perform the searches.

Thanks in advance.

M. Carmen