This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes How to access Database configuration from server.xml in tomcat5.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to access Database configuration from server.xml in tomcat5.0" Watch "How to access Database configuration from server.xml in tomcat5.0" New topic
Author

How to access Database configuration from server.xml in tomcat5.0

Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113
Hi all,

I have the following set up in my server.xml .I want to know how to access the database connection in the java file.
do I need to write a separate class again to access the database or I can simply say get connection and run the query.





Thanks,
Jyothsna
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Look at http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html & http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
jQuery in Action, 2nd edition
 
subject: How to access Database configuration from server.xml in tomcat5.0
 
Similar Threads
Tomcat with mysql database
Tomcat and jdbc/odbc
How to access database without using the Connection object?
struts 1.3 Data base connection pool
Display data from oracle to tomcat