title: New to Java - What's JPA and DAO?
body: <p>I'm new to Java and i'm trying to make a web project with servlets.
  I'd like to query my database but I think I don't understand everything about JPA and DAO.</p>
  
  <p>I've been taught to do things this way :</p>
  
  <ul>
  <li>Create class com.package.entity.User (generated from my database)</li>
  <li>Create interface com.package.dao.UserDao</li>
  <li>Create class com.package.dao.jpa.JpaUserDao implementing UserDao</li>
  <li>Create EJB com.package.service.UserService with methods like <code>public List&lt;User&gt; findAll()</code></li>
  </ul>
  
  <p>I've heard there's no need to create a DAO interface with JPA but I'm completely lost and I don't understand at all what I should do or what an EJB is. I simply want to find all the users in my database and display their names following Java's good practices.</p>
  
  <p>It's allready OK for my servlets and JSPs.</p>
  
  <p>What would you recommend ?</p>