Linux command for extracting war file?

ammar picture ammar · Sep 30, 2010 · Viewed 233.6k times · Source

How can I extract a .war file with Linux command prompt?

Answer

Jigar Joshi picture Jigar Joshi · Sep 30, 2010

Using unzip

unzip -c whatever.war META-INF/MANIFEST.MF  

It will print the output in terminal.

And for extracting all the files,

 unzip whatever.war

Using jar

jar xvf test.war

Note! The jar command will extract war contents to current directory. Not to a subdirectory (like Tomcat does).