Meaningless Drivel is fun!*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access Database configuration from server.xml in tomcat5.0