title: How to configure LDAPS authentication on Tomcat 7
body: <p>To start, I configure HTTPS on Tomcat and I configure a authentication page.
  My authentication page work in HTTPS with an user in Tomcat-users.xml </p>
  
  <pre><code>&lt;form action="j_security_check" method="POST"&gt;
         Username:&lt;input type="text" name="j_username"&gt;&lt;br&gt;
         Password:&lt;input type="password" name="j_password"&gt;
         &lt;input type="submit" value="Login"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>On server.xml I configure a realm</p>
  
  <blockquote>
    <p>&lt; Realm className="org.apache.catalina.realm.JNDIRealm"</p>
    
    <blockquote>
      <p>connectionURL="ldaps://XXXXXXX:636"
       debug="99"
      <br/>
       connectionName="MY_USER"
      <br/>
       connectionPassword="MY PASSWORD"
      <br/>
       userbase="MY_BASE"
      <br/>
       userSearch="XXXXXXXXXXXX"
      <br/>
       userSubtree="true"
      <br/>
       roleBase="XXXXXXXXXXX"
      <br/>
       roleSubtree="true"
      <br/>
       roleName="XXXXX"
      <br/>
       roleSearch="XXXXXX"</p>
      
      <p>/></p>
    </blockquote>
  </blockquote>
  
  <p><br/>
  <br/>
  I import my certificate with the command keytool. </p>
  
  <blockquote>
    <blockquote>
      <p>keytool -import -file om_certificat.pem -keystore cacerts</p>
    </blockquote>
  </blockquote>
  
  <p>Should I do something else?</p>
  
  <p>When I start tomcat, I have this warning:
  <a href="https://stackoverflow.com/questions/6659360/how-to-solve-javax-net-ssl-sslhandshakeexception-error">SSLHandshakeException</a></p>
  
  <p>I did this, but doesn't work !
  I think, my reaml is correct and when I did the command "keytool", I receive a message "the certificate is added". </p>
  
  <p>So where, is my problem ? I forget a step ?</p>