How do I force a tomcat web application reload the trust store after I update it

牧云@^-^@ 提交于 2020-01-15 06:11:14

问题


I have the following problem. My tomcat 5.5 based web application is using a trust store to verify SSL connections. The application allows the user to add or remove CA certificates to be used in the verification process. However, adding or removing certificates from the trust store doesn't change a thing. The application 'recognizes' only the certificates that were in the trust store when tomcat started. For it to recognize the new set of certificates, I need to restart tomcat.

This is not a valid solution, however. What I do need is a code based solution. Please advice.


回答1:


how about writing a Custom Classloader that loads in the trust store ONLY for this webapp. You could unload the classloader when you need to refresh the contents and reload it ?



来源:https://stackoverflow.com/questions/161160/how-do-i-force-a-tomcat-web-application-reload-the-trust-store-after-i-update-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!