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
We are running in a Windows environment and I had to find a way to get the Tomcat version outside of the Java environment. Without knowing the version, I could not determine the directories. I finally found the best way was to query the Tomcat service using:
C:\temp>sc query | find /I "tomcat"
SERVICE_NAME: Tomcat6
DISPLAY_NAME: Apache Tomcat 6.0 Tomcat6
execute the script in your tomcat/bin
directory:
sh tomcat/bin/version.sh
Server version: Apache Tomcat/7.0.42
Server built: Jul 2 2013 08:57:41
Server number: 7.0.42.0
OS Name: Linux
OS Version: 2.6.32-042stab084.26
Architecture: amd64
JVM Version: 1.7.0_21-b11
JVM Vendor: Oracle Corporation
run the following
/usr/local/tomcat/bin/catalina.sh version
its response will be something like:
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /var/tmp/
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_PID: /var/catalina.pid
Server version: Apache Tomcat/7.0.30
Server built: Sep 27 2012 05:13:37
Server number: 7.0.30.0
OS Name: Linux
OS Version: 2.6.32-504.3.3.el6.x86_64
Architecture: amd64
JVM Version: 1.7.0_60-b19
JVM Vendor: Oracle Corporation
In the main Tomcat folder you can find the RELEASE-NOTES file which contains the following lines (~line 20-21):
Apache Tomcat Version 8.0.22 Release Notes
Or you can get the same information using command line:
Windows:
type RELEASE-NOTES | find "Apache Tomcat Version"
Output:
Apache Tomcat Version 8.0.22
Linux:
cat RELEASE-NOTES | grep "Apache Tomcat Version"
Output:
Apache Tomcat Version 8.0.22
To find out the Tomcat version, find this file – version.sh for *nix or version.bat for Windows. This version.sh file is normally located in the Tomcat bin folder.
phpmongodb@kumar:/usr/share/tomcat7/bin$ ./version.sh
Note
If you are not sure where is the version.sh file, try this command :
sudo find / -name "version.sh"
Find out everything about Tomcat7.
sudo find / -name "tomcat7"
I have this challenge when working on an Ubuntu 18.04 Linux server.
Here's how I fixed it:
Run the command below to determine the location of your version.sh
file:
sudo find / -name "version.sh"
For me the output was:
/opt/tomcat/bin/version.sh
Then, using the output, run the file (version.sh
) as a shell script (sh
):
sh /opt/tomcat/bin/version.sh
That's all.
I hope this helps