Editing single file in WAR or JAR archive
by Taavi Rammar

To patch single file in war (or jar) archive, first find the path of the file in archive:
jar tvf yourwar.war|grep yourfile.xml
Next, unpack it:
jar xf yourwar.war path/to/yourfile.xml
Make your changes and add file into .war file w/following command (execute in same directory where you unpacked it):
jar uf yourwar.war path/to/yourfile.xml
Done!

Copyright by techTips