Can some one help me with sorting? I have the following code:
...
DirContext ctx = new InitialDirContext(env);// get a reference to a directory context
// 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);
// begin search
// specify the scope of the search
SearchControls constraints = new SearchControls();
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
...
And I get the following error message:
Generated
servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] D:\Program Files\Apache Group\jakarta-tomcat-5\work\Catalina\localhost\sweetheart\org\apache\jsp\phone_005fbook_jsp.java:203: cannot resolve symbol
[javac] symbol : method setRequestControls (javax.naming.ldap.Control[])
[javac] location: interface javax.naming.directory.DirContext
[javac] ctx.setRequestControls(ctxCtls);
[javac] ^
[javac] 1 error
Any clues?