0

There is a Tomcat webapp that we update regularly. We are looking for an easy way to determine what version is now on the server.

Currently, the webapp has a specialized web-service that returns a version number. However, this requires us to remember to update the version number each time before we deploy the webapp. We are looking for a more automatic way.

One option that we consider is to add a web-service that returns the last update time of a certain file. However, we are not sure what file exactly to check and how to calculate its last-update-time.

Is there a better solution?

gongsun
  • 534
  • 7
  • 18
Erel Segal-Halevi
  • 33,955
  • 36
  • 114
  • 183
  • There is a similar question here: http://stackoverflow.com/questions/14925073/how-to-find-out-running-tomcat-version – slipperyseal Feb 13 '17 at 05:47
  • @SlipperySeal That question is about the version of Tomcat. We am interested in a version of a specific Tomcat webapp that we am writing (for example, after one of the developer made some changes, we want the other developers to know that he uploaded a new version of the webapp) – Erel Segal-Halevi Feb 13 '17 at 05:58
  • Ohh. Sorry. In that case, I can recommend what we do on some of the project I work on. We have regular version number which we update either manually or a build number, and as part of the build process, we also have the git hash baked into a html file. This way you know EXACTLY which version you are dealing with. try something like this command. there might be better ways: cat .git/ORIG_HEAD – slipperyseal Feb 13 '17 at 08:24

0 Answers0