Search for the META-INF/MANIFEST.MF of the war (if available) and look for attribute keys to represent the version. For example, use "Implementation-Version" if present, else use "Build-Time" and so forth. Print out all other attributes in detail.
If the MANIFEST.MF is not available (as would be the case if running from an IDE), then omit.
In addition, dump out the manifest attribute of all other JAR files on the manifest, as detail.