Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Tomcat and the fly likes tomcat working directory 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 working directory" Watch "tomcat working directory" New topic
Author

tomcat working directory

Emil Nachev
Greenhorn

Joined: Oct 28, 2011
Posts: 10
Hi,
Doing a webapp with servlets, jsp, tomcat7
For testing purposes, I want to load some externall data into my app
The external data as text in files - quite primitive
The point is I cannot read the files provided I set a relative path - tomcat cant find them.
Data files placed the same folder where I have the java class file reading them.
tried:
System.getProperty("user.dir")
And I got the current directory as tomcat/bin
Where to map the location of such external resources, so I dont need to place them in /bin folder?
Don't see appropriate nodes in the application's web.xml

Best Regards

 
jQuery in Action, 2nd edition
 
subject: tomcat working directory
 
Similar Threads
No class found - org apache tomcat util SystemLogHandler
How can we host a jsp in unix web server
NTSystem.dll and JBOSS 3.x
[Tomcat 5.5] how to access a folder out of the web application
unable to create new directory