wood burning stoves 2.0
The moose likes Tomcat and the fly likes properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "properties file" Watch "properties file" New topic

properties file

Benjamin Hundley
Ranch Hand

Joined: Mar 06, 2006
Posts: 54
Hello. I'm using Tomcat 5.5 to deploy my website. I'm deploying it via a WAR file. When I start Tomcat it doesn't seem to unpack the WAR file into the webapps directory because when I check the directory after starting it still has a WAR file. But my question is this.

I want to stick a database properties file into my WAR file that holds the connection information to my database. It seems that the class that is connecting to the database is running from the very root of my tomcat installation directory (one directory above the webapps folder) so it is looking for my properties file there. But I don't want that properties file associated with every single webapp. I only want it associated with my specific application. Is there a convention in place for these types of things? Where would you normally put properties files that are specific to your web application?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
I agree. Here's the link: http://aspose.com/file-tools
subject: properties file
It's not a secret anymore!