title: basic/digest authentication implementation in Java server code/web server
body: <p>We need to support basic authentication and later digest authentication in Java web project.
  My doubt is</p>
  
  <ul>
  <li>Whether basic/digest authentication is a configuration in web server
  (tomcat, jboss etc).Our users/password are in a SQL database and we
  get these through dataservices. In this case how I can configure the
  web server to use the dataservices to authenticate?</li>
  <li>Whether I need to handle explicitly in code for basic/digest
  authentication? Like I will receive authentication request from
  Servlet and will connect to dataservices for authentication?</li>
  </ul>