Neil, I think the instructions here are a pretty good start. I've used them a few times to setup LDAP authentication and they have been helpful.
https://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#JNDIRealm In my opinion, the hardest part is to figure out the correct LDAP options and searches to use. Each LDAP system can be organized in a different manner, so you have to tweak these depending on how your organization has setup LDAP. What I've found helps with this is to use the Apache Directory Studio. It makes testing connection options and search queries easy, plus it give a good way to browse the LDAP tree. If you want to go another route, I would also recommend Spring Security. It has excellent support for LDAP. Dan ----- Original Message ----- From: "Neil Munro" <neilmu...@gmail.com> To: users@tomcat.apache.org Sent: Thursday, March 15, 2012 12:22:18 PM Subject: Tomcat, JSP and LDAP Hi all, I am trying to implement a means to authenticate a user on a web app via ldap, I have been trying for some time and am now intimately familiar with the files I need to edit, but not exactly how. I know that much of the ldap stuff goes into the server.xml file inside of the tomcat conf directory, it is here I have been trying to configure an ldap realm. I have attached the files I have been working with, the basic idea is that a user must first log on before they can access any area of the site, also all users can log in, and access all areas of the site. A user is presented with the login page, and if they cannot be authenticated they are alerted and are given the option to redirect back to the login page. Which I have working, thought I think that's simply because I cannot get the logging in bit work. I do not have access to the LDAP server or schema and cannot implement changes to that, I can however alter the tomcat server, jsp files etc. I am trying to write a company wide web app, and have free reign, but it's historically been written in jsp so we want to keep as much of that as we can. Software and versions: Tomcat 6.0.35, Java 1.4 through to 1.7 (I am required to have all installed) and Windows 7 64. Any help would be fantastic as I have read lots of resources but there's no definitive tutorial to set such a thing up. Thanks, Neil Munro --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org