JVM argument from WAR resource deployed at tomcat
JVM argument from WAR resource deployed at tomcat
I generated a war file which contains a keystore as a resource inside this war file and I want to deploy it at tomcat using jvm arguments in order to specify the keystore and truststore. The problem is that the relative path is always wrong according to tomcat, and I don't want to put the absolute path, since I want to deploy it at heroku and won't be able to know the absolute path?
Here is the command line:
java -Djavax.net.ssl.trustStore=sample/truststore.jks -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.keyStore=sample/keystore -Djavax.net.ssl.keyStorePassword=password -Djavax.net.debug=ssl -jar target/dependency/webapp-runner.jar target/*.war
This sample directory is inside the /WEB-INF/classes directory inside the exploded WAR.
PS: using the absolute path, I'm able to run the app smoothly.
How can I find out the relative path?
1 Answer
1
All paths may be relative to CATALINA_BASE or CATALINA_HOME
Refer:https://www.mulesoft.com/tcat/tomcat-classpath
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Try using the $CATALINA_HOME this should be set to the tomcat home directory.
– Jason Heithoff
Jul 19 at 2:14