WAR file is a "Web Application Archive" -- it's comprised of all the pieces of your web application: JSPs, Servlets, Images, Static HTML, images, etc. -- and all packaged in a single snazzy little file. Couple great advantages of a WAR file --> 1- Easily transferred from development to production machines (there aren't TONS of files to move and make sure they're all in the right order). 2- They're self describing -- it contains a deployment descriptor (web.xml) that tells the app server exactly what's in it and how its run. 3- It's standards based -- so you can (in theory) deploy this one WAR file onto ANY app server Vendor (HP, BEA, IBM etc).
yup -- simply use the jar command but specify the name of the output file as something.war rather than .jar. Also, there are some utilities out there that will help you to create WAR files and the deployment descriptors that go with them. You can check out HP RadPak, it comes with the HP-Application Server. It also gives you the ability to look inside and even edit the contents of JAR/WAR files without exploding them.
Can you please explain .ear files? the steps to create an .ear file, the usage it is subjected to and the difference between .ear and .war files? Thanks in advance. [ May 21, 2002: Message edited by: Meena Samba ]