creating war file in eclipse
If you are using eclipse 3.5 then goto window menu-> Preferences ->Server (on left side) -> Runtime Environment then click Add button then select the web server, which ever you want and click next -> browse the location of server.
Now,
Create Dynamic Web Project ,build it, right click on your project in Project Explorer, click Export->WAR file and browse the location where you want to create WAR file.
Now,
Create Dynamic Web Project ,build it, right click on your project in Project Explorer, click Export->WAR file and browse the location where you want to create WAR file.