You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by frederik gens <fr...@yahoo.com> on 2004/06/18 11:19:46 UTC

NEWBIE: flexible declaration of a database URL

Hello,
 
I'm currently developing a JSP/Servlet/JDBC application with Tomcat. In several classes called by servlets, I declare the URL which identify the database in order to open the connection. 
 
My question is: what is the best way to declare this URL only once, for example in a file, or in an environment variable. Therefore, the classes always call this variable. Changing the place of the database just requires to change the URL in one place.
 
Thanks in advance!
Frederik

		
---------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!