LDAP JAVA:在活动目录中搜索许多OU = ...

时间:2013-02-25 21:01:32

标签: java eclipse active-directory

我想在浏览器中进行全球研究。我有5个文件夹,我希望这5个文件夹中都包含所有解决方案。

有人有想法吗?

ctx = new InitialDirContext(env);

             Attributes matchAttrs = new BasicAttributes(true); // ignore attribute name case

             matchAttrs.put(new BasicAttribute("mail");

             // Search for objects that have those matching attributes
             NamingEnumeration<SearchResult> answer = ctx.search("DC=corp", matchAttrs);`enter code here`

1 个答案:

答案 0 :(得分:0)

好的不知道为什么,但我的功能searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);无效。

这里有效。

对不起帮帮忙,对不起我的声誉:D