This command helped me in adding my changes inside a folder named 'custom' placed at location 'D:\MyWarLab' into the 'custom' folder inside my 'webtop.war'.
D:\MyWarLab>jar uf webtop.war custom
Now this worked as expected since the 'custom' folder was already present inside the war.No. It worked because 'custom' existed in the file system as a directory with files under it. Whether it was already in the war is irrelevant.
This customA folder would contain the java class files i have created. The customA folder does not already exist at the above mentioned location, hence the need to create it.If it exists on the disk you can add it to the war with the jar uf command.
I have not been able to find a jar command to add new folders at desired locations of the war.You've already found it!