dcsimg
How can I do a search and return sorted results through...
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kumar_venugopal
Posted On:   Thursday, February 22, 2001 08:01 AM

How can I do a search and return sorted results through JNDI?

Re: How can I do a search and return sorted results through...

Posted By:   Thomas_Valletta  
Posted On:   Thursday, August 9, 2001 10:37 AM

I have used the following code to create a sorted set of results. Your context variable would be the context you wish to list (eg. "o=kumar").





LdapContext ctx = new InitialLdapContext(env, null);

Control[] ctxControls = new Control[]{

new SortControl(new String[]{"cn"}, Control.CRITICAL);

};

ctx.setRequestControls(ctxControls);

NamingEnumeration results = ctx.list(context);


About | Sitemap | Contact