A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Joined: Oct 30, 2009
Mar 12, 2010 12:11:54
why can't we put the code in
(in place of Listener i.e
) 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
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
subject: Regarding ServletContextListener
WA #1.....word association
how-to call some servlet or bean when war is loaded
Can not compile filter
Starting process threads when Tomcat starts
Loading the Properties file in a Web Application
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014