*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "properties file" Watch "properties file" New topic
Author

properties file

Benjamin Hundley
Ranch Hand

Joined: Mar 06, 2006
Posts: 53
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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

See:
http://wiki.apache.org/tomcat/HowTo#head-45c3314139cb900ddd43dde2ff671532e6e844bc


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
 
Similar Threads
Advice on deploying WAR file
Instant Deploying of Applicatio from within IDE
Tomcat: How can change root context and extracted files?
(re)Deploying struts apps
.war query