dcsimg
Where to define my dbUrl?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   joe_lewis
Posted On:   Monday, December 29, 2003 08:11 PM

I'm in the process of building a database-driven Tomcat webapp. Right now I refer to the DB directly in the servlet code.

			
connection = DriverManager.getConnection("jdbc:mysql://wherever/test");


But it seems to me there's a smarter place to define the URL. Perhaps in an XML file? Any tips?

Thanks.

Re: Where to define my dbUrl?

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, December 30, 2003 05:49 AM

You could perhaps put the string in a resource bundle (properties file in WEB-INF/classes), or in a servlet parameter in the web.xml

About | Sitemap | Contact