Trupti, A jar (java archive) file contains code. A war (web archive) file contains code, html, jsps, property files and anything else contained in your web application. An ear (enterprise archive) contains a war and ejb-jars.
All of them use the same compression technology. Interestingly, this is the same compression used by zip software.