I want to have my custom java.security.auth.login.config property to be read from a user defined file from tomcat directory say TOMCAT_HOME/bin/jass.config.
:: Settings in setenv.bat ::
set "jaasFile=C:\Users\...\apache-tomcat-8.5.33\bin\jass.conf"
set "CATALINA_OPTS=%CATALINA_OPTS% -Djava.security.auth.login.config=%jaasFile%"
however if I am reading it from java class is shows as null :
System.getProperty("java.security.auth.login.config"); // Showing as null
any hint how to achieve this?
The
setenv.batbatch file is only sourced by the*.batfiles distributed with Tomcat. No other method of starting the server uses that file.If you start Tomcat from Eclipse, you can edit the JVM parameters and environment variables in the server's configuration page: double-click or hit
F3on the server in the "Servers" view to open its "Overview" page, then click on "Open launch configuration".If you start Tomcat as a window service, open the Procrun monitor application (renamed to
tomcat8w.exein Tomcat's installation directory) and set the values there.