On 02/10/18 17:41, Amit Pande wrote:
> Hello SMEs,
> 
> I am looking at Tomcat documentation to see if there is a way to move the 
> “<Tomcat_Base_Folder>/conf” to a custom location and use this path while 
> running the startup/shutdown scripts.

Why? What problem are you trying to solve?

> I have looked at the 
> https://github.com/apache/tomcat85/blob/TOMCAT_8_5_34/java/org/apache/catalina/startup/Catalina.java
>  and confirmed we can pass a -config <path_to_server_dot_xml> to the Tomcat 
> scripts (catalina.bat/sh, startup.bat/sh, etc).
> 
> Wanted to confirm:
> 
> 
>   1.  Why is “-config” option not documented as part of help of the 
> startup/shutdown scripts? Is this a supported configuration that we can use 
> without worrying about future breaking changes in this?

It appears that this dates back to Tomcat 4.0.x (I couldn't find it in
3.3.x). It isn't something that I have seen used very much.

If I had to guess, I'd say the option was added either when server.xml
was the only configuration file or the location of the other
configuration files could be specified in server.xml.

Over the years additional configuration files were added to the default
location and, because the -config option was little used, the
requirement to make that location configurable wasn't considered.

>   2.  Currently, as part of “-config” option we’re able to pass on the path 
> to server.xml only. What is required to be done so that entire Tomcat 
> configuration (conf directory) can be moved to a custom location?

Looks like a fair amount of work as $CATALINA_BASE/conf/ is hard-coded
in a *lot* of places. Making it configurable is going to be very
invasive. There would need to be a very strong justification for a
change along those lines.

>   3.  I am still debugging why, but on Linux setups, I have observed 
> “configtest” script isn’t working with “-config <path_to_server_dot_xml>”. I 
> am seeing “WARNING: Unable to load server configuration from 
> [path_to_server_dot_xml] Configuration error detected!”. Is this know issue 
> on Linux system? It seemed to work fine for Windows.

I suspect it is a bug.

> Appreciate your inputs.

At this point my recommendation would be to look at alternative
solutions rather than using -config. Once we know what the requirement
is, we can provide some advice.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to