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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With