Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
246 views
in Technique[技术] by (71.8m points)

java - Tomcat: How to find out running Tomcat version?

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 an already installed tomcat (ver. 7.0.27) instead of the downloaded one. I made the change following the appfuse FAQ.

After deploying with mvn cargo:run, how can I know that the actual running tomcat is indeed 7.0.27?

I used to type a wrong URL (ex. localhost:8080/dfsfsdf) to see it in the error page, but now it shows nothing.

My $CATALINA_HOME points to my own tomcat 7.0.27. sorry forgot to mention, it's for Windows.

Update:

Since this question had become somehow popular, I would like to explain why that accepted answer. simple, it was the first one which solved my problem.

I am looking at the title of the question, @Tech Junkie and @CPU 100 really have the best answer, but not for the scenario I was encountered. (I was wanting to know if mvn cargo:run runs my installed tomcat or a "project embeded" tomcat) :)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Though this is not recent, I thought, my answer can still help others:

cd tomcat/lib 
java -cp catalina.jar org.apache.catalina.util.ServerInfo

and that's it.

Server version: Apache Tomcat/7.0.30
Server built:   May 23 2013 02:54:10
Server number:  7.0.30.0
OS Name:        Linux
OS Version:     3.13.0-36-generic
Architecture:   amd64
JVM Version:    1.7.0_65-b32
JVM Vendor:     Oracle Corporation

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...