Hi to everyone.
With your help I have successfully resolved a question that I have asked here. I have developed a custom Tomcat authenticator for the web application, and currently the authenticator and its configuration file are located in the %CATALINA_HOME%\lib\
directory. Unfortunately, the authenticator configuration file is almost a duplicate for the configuration file of the web application (located in %CATALINA_HOME%\webapps\myapp
) the authenticator was developed for, and the configuration files both, obviously, share the same DB-connection settings. This is inconvenient because sharing the only configuration file would be the best.
I think there could be two ways to resolve the issue:
- Find the
webapps
directory formyapp
presence somehow at Tomcat startup, and then read the application configuration file (proceed from the current situation, and themyapp\WEB-INF\web.xml
is configured properly). Sure, unfortunately this requires Tomcat restart. - There might be a way to put the form authenticator into the corresponding web application directory to be able to read the shared configuration file directly. Perhaps this might eliminate Tomcat restart and allow simple redeployment.
I would like to prefer the second solution if it's possible, but I'm not sure. Which way is better, if they both exist? Or is there any other and even better solution not putting the web application specific authenticator into %CATALINA_HOME\lib%
?
Thanks in advance and sorry for my English.