Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
给定一个 servlet 容器(JBoss、Tomcat、Jetty 等),是否可以找到当前由 JVM 或更具体地说是 servlet 容器实例化的所有 servletcontexts(或 servletconfigs)?如果是这样,怎么做?
我不确定其他容器,但 Tomcat 允许您通过 JMX 访问大量信息。将 jconsole、VisualVM 或其他 JMX 浏览器附加到 Tomcat 进程并在 Catalina,type=WebModule 下查看,您可以看到已加载上下文的列表。您可以在该子树中找到的每个 JMX bean 都包含有关服务器状态的大量信息。