aspose file tools*
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access Database configuration from server.xml in tomcat5.0
 
Similar Threads
How to access database without using the Connection object?
Display data from oracle to tomcat
Tomcat with mysql database
Tomcat and jdbc/odbc
struts 1.3 Data base connection pool