This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
So your error message is "java.lang.NoClassDefFoundError: br/salesianos/dao/HibernateDAO"
It works for your stand-alone application, but not for your web application.
Have you added this class into the classpath for your web application?
Classpath for a web application means the WEB-INF/classes folder and jar files in the WEB-INF/lib folder.
I think the only thing you are missing is to tell NetBeans that your web application wants to use this code.
I don't know much about Netbeans, but presume you already have a "web" project that runs a web server through netbeans? Or are you deploying externally somewhere?