Tomcat: How to find out running tomcat version

前端 未结 27 1968
臣服心动
臣服心动 2020-11-30 16:18

I\'m trying to get Appfuse + tomcat + jRebel working.

Appfuse by default uses Cargo to download tomcat (ver. 7.0.33) and deploy the application to it. I wish to use

27条回答
  •  余生分开走
    2020-11-30 17:15

    I know it is maybe too late for this, but this could be usefull: If you try to know Apache Tomcat Server version from Java code, you can use:

    from a HttpServlet:

    protected void doGet(HttpServletRequest request, HttpServletResponse response) {
        getServletContext().getServerInfo()
    }
    

    from a ServletContextListener:

    public void contextInitialized(ServletContextEvent event)  { 
        event.getServletContext().getServerInfo();      
    }
    

提交回复
热议问题