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.
Hello friends, I am confused. Servlets and JSP both do the same thing then in actual web development do we use Servlets. Where are listeners and filters used, even we can work out without them? Kindly guide. Thanks in advance
Poornima Sharma ---- So to get a database connection what should I use a servlet/listener/jsp. I cant get the best
You can use a listener (class which implements ServletContextListener) to create a DataSource and make it available to other parts of your web application (i.e: storing in the ServletContext) at the startup.