Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web app version in Tomcat Manager

How can I configure my web application for deployment in Tomcat so that Tomcat Manager shows the version in the table that lists all applications installed (/manager/html/list)?

Currently it shows "None Specified" for all apps, including itself. I am using Tomcat 7.0.11.

like image 410
John in MD Avatar asked Jun 14 '11 17:06

John in MD


People also ask

What is Tomcat Manager web application?

The Tomcat Manager is a web application that can be used interactively (via HTML GUI) or programmatically (via URL-based API) to deploy and manage web applications. There are a number of ways to perform deployment that rely on the Manager web application. Apache Tomcat provides tasks for Apache Ant build tool.

How do I open Tomcat web application Manager?

The default path to load the Tomcat Manager application is http://localhost:8080/manager/html. You will be prompted to enter the username and password that was stored in tomcat-users.


2 Answers

The version is the one specified when deploying the application through the manager.

See the documentation:

tag: Specifying a tag name, this allows associating the deployed webapp with a version number. The application version can be later redeployed when needed using only the tag.

Also, you can deploy multiple versions of the same war by adding the version after ## (e.g. myApp##1.0.war, myApp##1.1.war). The manager will show this version in the overview.

like image 175
Bozho Avatar answered Oct 03 '22 03:10

Bozho


With maven set the output war file name:

... <artifactId>MyTest</artifactId> <version>0.0.1</version> ... <build>     <finalName>${project.artifactId}##${project.version}</finalName> </build> ... 

Output -> MyTest##0.0.1.war

Or simple rename war-file with format file_name##version.war ;)

like image 31
CamelTM Avatar answered Oct 03 '22 03:10

CamelTM