A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Joined: Oct 30, 2009
Mar 12, 2010 12:11:54
why can't we put the code in
(in place of Listener i.e ServletContextListener) to initialize the application with database DataSource that all the
please correct me if I'm wrong.
Author and ninkuma
Joined: Jan 10, 2002
Mar 12, 2010 12:14:26
You can. You can also use a hammer to drive in a screw. But it's the wrong tool for the job. Servlets are meant to respond to requests, context listeners are meant to perform setup. Use the right tool for the job.
Asking smart questions
Books by Bear
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Regarding ServletContextListener
servlet and mapping declarations in web.xml
having trouble Initializing database connection from within ServletContextListener
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015