Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to confgure multiple organisational units for ldap configuration

Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,

I'm having a problem with configuring multiple OUs in tomcat 6.0.14.

My application uses the LDAP for authentication. All the suers are not belongs to the same OU.

So I want to search multiple OUs. Due to performace, decided not to configure root level which search the entire directory.

So please advise me on configuring multiple OUs.

I have two OUs like:

ou=users,ou=java team,ou=development,ou=software unit,DC=SOU,DC=example,DC=com


OU=php team,OU=Users,OU=Testing,OU=software unit,DC=SOU,DC=example,DC=com

Below is my configuration details.

I'm using search scope as SearchControls.SUBTREE_SCOPE in my java class.

Any help is highly appreciated.

Tomcat's server.xml:

<Resource name="myapp"







ldap.base="ou=users,ou=java team,ou=development,ou=software unit,DC=SOU,DC=example,DC=com"



NOTE: And also sometimes it is getting timeout exception. after restarting tomcat it is connecting fine. Please help me on this.



Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if this will help you but can try it someting like:userPattern=" (cn={0},ou=FirstOU,dc=yourDC,dc=DCXXX)(cn={0},ou=FirstOU,dc=yourDC,dc=DCXXX)

Saloon Keeper
Posts: 24825
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. There's a "Code" button on our message editor. If you use that to generate tags around pre-formatted text such as Java code and XML, it's a lot easier for us to read.

2. Look back about a week or so in this forum. This question has been popular recently.

3. There's nothing really special about doing this kind of request in Tomcat. You'd set up the same sort of LDAP query, Tomcat or not. So you might want to ask how to do queries like this in our LDAP forum.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic