Lets say I have a .war file
myWarFile.war
This file has a jar file inside it - WEB-INF/myJarFile.jar
I want to see what are the files inside myJarFile.jar without extracting the war file.
Is there a way to do it?
If you don't want to extract the file you can use vim filename. war to read the contents of the file. You can read subdirectories of files by selecting them and pressing enter.
The WAR file (Web Application Resource or Web Application ARchive) is a container for JAR files, JavaServer Pages, Java Servlets, Java classes, XML files, tag libraries, static sites (HTML and associated files), and other resources that make up an online application. A file entitled web.
jar xvf thewar.war /path/to/jar/inside/war #extract the file...
jar tvf /path/to/jar/indide/war.jar # read the extracted jar
rm /path/to/jar/inside/war # remove it
I just did this and it did not delete the file I extracted from the war. Please verify that though...;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With