Seeing contents of war file without extracting

2020-04-05 10:06发布

问题:

I created a simple web application and deployed in Tomcat using the admin console of Tomcat. Now, this war files gets stored in tomcat location under webapps directory.

Is there a way to see the contents of this war without extracting? I know we can see the contents of war file by extracting using jar -xvf ; however is there any tool/mechanism by which to see the contents of war files without extracting it?

Thanks for your time!

回答1:

The t option to the command line jar program will list the contents of a jar (or war) file, e.g.:

$ jar tf the-file.war


回答2:

A little late to the party, but you can use 7-zip or other similar software to view the contents of the .war

With 7-zip:
Right click on file.war -> Open archive



标签: tomcat jar war