We have the following example:
< Connector
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="${user.home}/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS" />
How can I make the "keystoreFile" point to an environment variable? ${env.CATALINA_HOME}/conf/file.jks doesn't works for me. Thanks.
I know this post is 3 years old....but i ran into the same problem today. So what I found out: tomcat searches the catalina_home as default, so you would just have to say
keystoreFile="conf/file.jks"
and it will find the keystore at
${env.CATALINA_HOME}/conf/file.jks
Edit: When Starting Tomcat from eclipse this does not work, because the CATALINA_HOME environment variable changes!
If what you actually want is the value of CATALINA_HOME, there is also a system property ${catalina.home} that you can use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With