[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
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