5

In the Tomcat manager web interface are different columns for data specified in the servlet. For instance the 'Display Name' column is filled with the value of the <display-name> tag in the web.xml. Another column specifies the version. How can I set this in the web.xml or WAR?

1

3 Answers 3

4

The "version number" you are seeing there is shown when you are using Tomcat's parallel deployment feature.

If you want to see a version number in there, you'll have to re-name your WAR file to be context-name##version where version is any string that will be alphabetically-compared to other versions in order to choose the latest one.

You really need to read the documentation for parallel deployment before you start using it, otherwise you are likely to confuse yourself.

3

web.xml does not contain a special tag to describe version of application. You can only declare application's version in optional description elements. For example, <display-name> tag. But it does not affect anything.

Just name your war file as myapp##1.7.3.war when building.

2
  • We have wars, that are named xyz-1.1.0.war. But in the version-column in 'manager/html' is shown: None specified. So automatically extracted from the WAR-name does not work. Also the name of the WAR directly reflects in the URL the webapp is available. For production the version is therefore not in the name.
    – Mnementh
    Dec 17, 2012 at 12:56
  • 3
    Try to use xyz##1.1.0.war. The official documentation has such syntax of declaration of version in war file name.
    – kapandron
    Dec 17, 2012 at 13:10
1

I am using Tomcat 7 and it uses the version of the WAR file. I am not aware of anything in the web.xml that is used for this.

See the Tomcat documentation here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.