aspose file tools
The moose likes Servlets and the fly likes Where to define datasource for servlets? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "Where to define datasource for servlets?" Watch "Where to define datasource for servlets?" New topic
Author

Where to define datasource for servlets?

Vidya Moorthy
Ranch Hand

Joined: Nov 13, 2003
Posts: 57
In Struts, you can define datasource in struts-config.xml. In my application using servlets and jsps, there are servlets which have to make connections using datasource. I was wondering if there was one central place where I could put this code instead of multiple places. Please let me know.
Thanks in advance
Vidya
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
You can use the web.xml configuration file.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: Where to define datasource for servlets?
 
Similar Threads
D/B connectivity problem
getDataSource
connection to database with struts
mysql connectivity failure
Connection Pool for JSP---Urgent