tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Soutter" <ge...@whitewolf.com.au>
Subject Re: TC4 base dir
Date Mon, 27 Aug 2001 08:53:42 GMT
"Craig R. McClanahan" <craigmcc@apache.org> wrote:
> No, Tomcat 4 doesn't currently have a thing like "home" -- patches are
> welcome!  But, my point is you don't *need* "home" to accomplish the
> goals you have articulated:

while we are on a related topic, how about (re) considering this patch?

geoff

----- Original Message -----
From: "Geoff Soutter" <geoff@whitewolf.com.au>
To: <tomcat-dev@jakarta.apache.org>
Sent: Tuesday, June 19, 2001 1:36 PM
Subject: [t4] [patch] for "inconvenient" -config current dir


> 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
>


Mime
View raw message