LDAP Query in XPages

I have an XPage based app that needs to query a LDAP Directory.

I assume this could be done in Java, but it sounds like it would be rather complicated. From what I can tell, it would require creating a jar file for with the Java portion and then use the methods of XPages to call that Java. While I am starting to understand XPages, my Java skills are weak so this method won’t be easy for me to do.

Any ideas on how I could accomplish this?