The most failsafe way to get the version regarless of the packaging is to do the following: (no, i’m not kidding)
1) find catalina.jar. It *should* be in server/lib/catalina.jar of your tomcat installation
2) Open it with winzip like program
3) Look for ServerInfo.properties (in org/apache/catalina/util/)
4) In that file is ther server version
app01s:/tmp # more /home/bmp/jboss/server/default/log/boot.log10:51:06,142 INFO [Server]
Starting JBoss (MX MicroKernel)…10:51:06,148 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)