Determining Grails Tomcat Version with CloudFoundry

Posted by {"display_name"=>"greg", "login"=>"greg", "email"=>"greg@udon.org", "url"=>""} on July 20, 2013 · 1 min read

Typically, CloudFoundry will supply Tomcat (currently version 6). Here's how to determine if you're packaging Tomcat with your WAR file and what version is being used in your CloudFoundry instance.

 WAR File Tomcat Version

If you've packaged Tomcat with your WAR file (normally you shouldn't be doing this). Open the WAR file which will be in your project's target directory. In the war file you should find and extract the file: tomcat\server\lib\catalina.jar

Open the catalina.jar file and read the contents of the file:

org\apache\catalina\util\ServerInfo.properties

You should see a line like this telling you the Tomcat Version:

server.info=Apache.Tomcat/7.0.39

CloudFoundry Tomcat Version

Using the CloudFoundry v1 command line tool, enter this command to copy the catalina.jar file to your local directory

vmc files YourProject /tomcat/lib/catalina.jar > catalina.jar

As desribed above, open the catalina.jar file and read the contents of the file:

org\apache\catalina\util\ServerInfo.properties

You should see a line like this telling you the Tomcat Version:

server.info=Apache.Tomcat/6.0.35

Grails Local Devel/Runtime Environment Tomcat Version

When you run your grails app from your development machine, you'll find the Tomcat version for the filename in the ivy cache:

$HOME/.grails/ivy-cache/org.apache.tomcat/tomcat-catalina/jars/tomcat-catalina-7.0.39.jar