Hi Mike, yesterday I already found out (thanks to a hint from Tim Funk) that in the "official" Apache Tomcat tarball a version.sh wrapper script is included. Having had a deko at the file also revealed to be nothing more than a mere invocation of catalina.sh script with the argument "version", exactly as you are proposing. The only drawback is that not every Tomcat bundler, like HP in my case, seems to have an affection for those handy scripts. It also seems to be heavily version dependent to find or miss one. E.g. on this hpux box of ours I've currently two versions of Tomcat installed. (on other boxes there are even more concurrent releases, which increases the confusion and sparked my interest in a quick way to identify a running Tomcat) However, only the newer release seems to be shipped with a catalina.sh. Still this doesn't get me any further since it only comes up with a usage screen:
# find /opt/hpws/tomcat /opt/hpapache2/tomcat -type f -name catalina.sh /opt/hpws/tomcat/bin/catalina.sh # /opt/hpws/tomcat/bin/catalina.sh version Using CATALINA_BASE: /opt/hpws/tomcat Using CATALINA_HOME: /opt/hpws/tomcat Using CATALINA_TMPDIR: /opt/hpws/tomcat/temp Using JAVA_HOME: /opt/java1.5 Usage: catalina.sh ( commands ... ) commands: debug Start Catalina in a debugger debug -security Debug Catalina with a security manager embedded Start Catalina in embedded mode jpda start Start Catalina under JPDA debugger run Start Catalina in the current window run -security Start in the current window with security manager start Start Catalina in a separate window start -security Start in a separate window with security manager stop Stop Catalina But I appreceate your reply, and assume that the catalina.sh call for your release and platform most likely will output the requested info. > -----Original Message----- > From: Mike Sabroff [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 01, 2006 8:49 PM > To: Tomcat Users List > Subject: Re: How to identify version of a running Tomcat and similar > trivia > > > > go to tomcat/bin > type "catalina.sh version" > output will look like: > Using CATALINA_BASE: /usr/local/tomcat > Using CATALINA_HOME: /usr/local/tomcat > Using CATALINA_TMPDIR: /usr/local/tomcat/temp > Using JRE_HOME: /usr/local/java > Server version: Apache Tomcat/5.5.12 > Server built: Sep 23 2005 09:40:42 > Server number: 5.5.12.0 > OS Name: Linux > OS Version: 2.6.11-1.1369_FC4 > Architecture: i386 > JVM Version: 1.5.0_06-b05 > JVM Vendor: Sun Microsystems Inc. > > > > Tim Funk wrote: > > Tomcat is like any server based java app. It will always require a > > convulted classpath as well as multiple classloaders to do anything > > interesting. > > > > 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 > > > > The version.sh script is just a wrapper the created the appropriate > > classpath so that the properties file can be loaded. > > > > > > -Tim > > > > [EMAIL PROTECTED] wrote: > > > >> Hi Tim, > >> <SNIP> > >> > >> Only problem is, my Tomcat depot on this box (randomly picked one > >> of our HP-UX boxes, but we also have Tomcats running on Linux, > >> AIX, Solaris (and probably Win32) doesn't seem to have bundled > >> such a wrapper script. > > > > > > > ----------------------------------------------------------------- ---- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > Mike Sabroff > Web Services > Developer > [EMAIL PROTECTED] > 920-568-8379 > > > ----------------------------------------------------------------- ---- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]