wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat's BasePath - how to set it for log4j and for file uploads? 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 "Tomcat Watch "Tomcat New topic
Author

Tomcat's BasePath - how to set it for log4j and for file uploads?

dave sag
Ranch Hand

Joined: Feb 17, 2003
Posts: 47
I start tomcat with startup.sh in my tomcat's /bin folder.
As a consequence all file paths I refer to programatically end up in that bin folder.
I want to configure log4j to put these files in the {tomcat}/logs folder and I want struts' file uploads to put the uploaded files in {tomcat}/myapp/userdata
how can I programatically set this base path (ie an option in my web.xml file for example) to tomcat_home so that i can then place logs and so forth without having to be concerned where my client may startup tomcat from?
we noticed that if she started her tomcat with a different script then the folder where that script lives becomes the new tomcat base path.
dave


JSF / Jini / Javaspaces / JDO - all rock in my opinion.
 
 
subject: Tomcat's BasePath - how to set it for log4j and for file uploads?
 
Similar Threads
tomcat classpath
tomcat classpath
Tomcat's BasePath - how to set it for log4j and for file uploads?
can I set the path in my code to refer a properties file?
logs generated