dcsimg
Sorting with LDAP
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ken_Yoshida
Posted On:   Wednesday, July 9, 2003 06:20 AM

I would like to be able to sort my ldap entries but am running into some difficulty. Here is a snippet of what I have: LdapContext ctx = new LdapInitialContext(env, null); // Create critical Sort that sorts based on givenName Control[] ctxCtls = new Control[]{ new SortControl( new String[]{"givenName"}, Control.CRITICAL) }; // Sets context request controls; effect until ctx.setRequestControls(ctxCtls); Here is the error that I receive: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] D:Program FilesApac   More>>

I would like to be able to sort my ldap entries but am running into some difficulty. Here is a snippet of what I have:



LdapContext ctx = new LdapInitialContext(env, null);


// Create critical Sort that sorts based on givenName
Control[] ctxCtls = new Control[]{
new SortControl(
new String[]{"givenName"}, Control.CRITICAL)
};

// Sets context request controls; effect until
ctx.setRequestControls(ctxCtls);


Here is the error that I receive:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] D:Program FilesApache Groupjakarta-tomcat-5workCatalinalocalhostsweetheartorgapachejspphone_005fbook_jsp.java:243: cannot resolve symbol
[javac] symbol : class LdapInitialContext
[javac] location: class org.apache.jsp.phone_005fbook_jsp
[javac] LdapContext ctx = new LdapInitialContext(env, null);
[javac] ^
[javac] 1 error


I have the LDAP Booster pack installed and the enviromental variables are set. Here are the libraries I am using:
...
javax.naming.*,
javax.naming.ldap.*,
javax.naming.directory.*,
com.sun.jndi.ldap.BasicControl,
com.sun.jndi.ldap.ctl.*;
...

   <<Less
About | Sitemap | Contact