Results 1 to 2 of 2

Thread: Changing Tomcat's working directory

  1. #1
    Join Date
    Apr 2008

    Changing Tomcat's working directory

    Hello All,

    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.

  2. #2
    Join Date
    Jan 2009
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles