Changing Tomcat's working directory
Would anyone know of a way to change Tomcat's working directory to something besides the bin directory? (e.g. [tomcat_install]\bin)
In case the answer is no, let me say that I'm trying to open a series of XML files from within my servlet. Currently, I have to write my paths relative to the bin directory, which is terrible. I want to keep the XML files in my WAR archive, and then have Tomcat execute out of the [exploded] project directory.
I found a couple of resources that may help you. Basically you need to load your resources based on the context path (not sure if I'm using the right name for it).
It should be almost identical to loading additional resources from a JAR file.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)