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?
- 1Duplicate of stackoverflow.com/questions/6347326/…, which has good & accepted answer inside.Anton– Anton2013-12-26 16:54:06 +00:00Commented Dec 26, 2013 at 16:54
3 Answers
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.
Comments
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 Comments
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.