2013-02-25 110 views
-1

我想在瀏覽器中進行全局研究。我有5個文件夾,我想讓這5個文件夾中有所有解決方案。LDAP JAVA:在活動目錄中的許多OU = ...中搜索

有人有想法嗎?

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` 
+0

重新構思你的問題。 – 2013-02-25 21:05:38

+0

好的:我有包含5個其他文件夾的文件夾。我怎樣才能找到所有的「CN」。我喜歡「ou = BigFolderWhoContains5Other」,但它只是打印出現在大文件夾中的CN而不是出現在5個文件夾中的CN – Riri 2013-02-25 21:15:10

回答

0

好吧不知道爲什麼但我的功能searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE);沒有工作。

這裏工作。

對不起,對於我的聲譽幫手和遺憾:D