In case you don't want to change your current working directory, it might be easier to run extract command in a subshell like this.
mkdir -p "/path/to/target-dir"
(cd "/path/to/target-dir" && exec jar -xf "/path/to/your/war-file.war")
You can then execute this script from any working directory.
[ Thanks to David Schmitt for the subshell trick ]