I have a Spring boot application. I want to display the current name and version of the servlet container on the Admin Console page.
My application currently uses Tomcat, but I want to automatically display the same information if I had to, say, switch to Jetty or some other built-in servlet container.
This information is not available (at least it seems) through Environment
or endpoints Actuator
.
How can I programmatically get the embedded name and version of a servlet container?
source
share