tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: How to identify version of a running Tomcat and similar trivia
Date Thu, 02 Feb 2006 11:29:33 GMT
This has been fixed in the tomcat 5.0.X line months ago with the inclusion of 
the version.bat and version.sh scripts. (Which call "catalina.sh version"). 
We can't help it if OS vendors repackage tomcat and omit those files.

-Tim

Ralph.Grothe@itdz-berlin.de wrote:
> Hi Tim,
> 
> yes, at least the later Tomcat release of HP has such a
> ServerInfo.properties method
> 
> # find /opt/hpws/tomcat -type f -name catalina.jar|xargs -n1 jar
> tf|grep -F ServerInfo.properties
> org/apache/catalina/util/ServerInfo.properties
> 
> # cd /tmp
> 
> # find /opt/hpws/tomcat -type f -name catalina.jar|xargs -n 1 -I
> CLASS jar xf CLASS org/apache/catalina/util/ServerInfo.properties
> 
> # ll /tmp/org/apache/catalina/util  
> total 16
> -rw-r--r--   1 root       sys             30 Feb  2 11:01
> ServerInfo.properties
> 
> # file /tmp/org/apache/catalina/util/ServerInfo.properties 
> /tmp/org/apache/catalina/util/ServerInfo.properties:    sed
> program text
> 
> # cat /tmp/org/apache/catalina/util/ServerInfo.properties 
> server.info=Apache Tomcat/4.1
> 
> 
> Ok, this is probably a pretty weird hack to identify a Tomcat,
> but it seems to be sufficiently reliable, and can be casted into
> a script.
> So from the proc table entry of the running Java master thread I
> will have to parse the full args
> token to retreive the classpath and jar dirs in the startup
> command line.
> Then I could run this find and extract stuff like above.
> What I still dislike is the need for a temporal extraction
> directory for a mere 30 byte string.
> I will have to find out a way if I could extract this into a
> pipe.
> 
> Still, I would hope the Tomcat developers could devise an easy
> and straight forward way to query this info
> from the shell.
> Come on lads, this should only take less than half an hour for a
> decent Java hacker.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message