Hi there,

As I've been twiddling with T4 again recently this problem has resurfaced.
In T3, I was able to specify the -config option relative to my current
directory. T4 has changed this so that a relative path used with -config is
resolved relative to CATALINA_HOME.

I find this annoying because I like to store my server.xml files into our
version control system, and it means that relative paths from my VCS work
dir to the server.xml don't work any more. I have to use something like
/<vcs work dir>/tomcat4/server.xml. Now, if you use an IDE to debug your
servlet in Tomcat, you need to enter this path into the config. And that
means that every time you create a new work dir, you need to update your IDE
project file.

So, can we please change back to "-config relative to the CWD" the way
Tomcat 3 worked? Or perhaps at least get it to check for it relative to CWD
before checking relative to CATALINA_HOME?

All thats required is to remove/change the absolute path stuff in the
configFile() method of Catalina.java like so:

protected File configFile() {
  File file = new File(configFile);
  /*
  NOTE: alternatively use !file.exists() here for "fallback"
  from CWD to CATALINA_HOME
  if (!file.isAbsolute())
    file = new File(System.getProperty("catalina.home") +
      File.separator + configFile);
  */
  return (file);
}

Geoff

Reply via email to