WAR (Web Archive) is a JAR file that includes the complete Web application deployment structure in a single archive file. The file structure includes all static webpages, WEB-INF directory and web.xml file, all librarries, and web component class files.
To export a project to a WAR file from the IDE:
In the Projects window, right-click the project-name node and choose Export WAR File.
In the Export WAR dialog box, choose the Java specification to which your target container conforms. For example, to deploy to Sun JavaTM System Application Server Platform Edition 8.2, select the J2EE 1.4 option. To deploy to Sun Java System Application Server 7, select the J2EE 1.3 option.
Enter the location to which to export the WAR file and click OK.
The IDE builds the WAR file using the default libraries. To add additional libraries to the WAR file, create a library reference in your project.