How to see the content of .war file

November 30, 2023 |

Extract content of .war file

A WAR file (Web Application Resource or Web application Archive) is a file used to distribute a collection of files and folders associated with web application. Sometimes we want to look inside the war file to know what files or folders are inside the war file. Jar -xvf jar with option -xvf will extract the content of the war file. Following command will extract the content of blogapp.war file into the current directory

jar -xvf blogapp.war

To extract the content of war file type the above command. For instance for a war file blogapp.war we can use the command jar -xvf.
A generic square placeholder image with rounded corners in a figure.
Content of the blogapp.war file


jar -xvf can be used to extract the content of jar file. This command will work in any platform with installed java.