Search code examples
javaeclipsetomcateclipse-wtp

How does WTP determine the Tomcat version


I found in Why won't the New Server Runtime dialog recognize my Linux installed version of Tomcat? that:

When identifying Tomcat 5.0.x, a servlet-api.jar is expected to be present in the common/lib directory.

but my problem is I have a slightly modified Tomcat 7.0.30 and WTP thinks it's 5.1

Where can I find a list of actual checks per Tomcat version?


Solution

  • Looks like the anwser is here: https://github.com/eclipse/webtools.servertools/blob/master/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatVersionHelper.java

    Funny thing, they don't inspect the external file CATALINA_BASE/lib/org/apache/catalina/util/ServerInfo.properties as described in https://tomcat.apache.org/tomcat-7.0-doc/security-howto.html