I recently wanted to export a web project into a war file. Everywhere I looked   it said: right click on the project then
Export > War File
Export > Web > War File
I did not have those options. The reason was that I had not the correct Eclipse version that supports Dynamic Web Projects. You need the Eclipse IDE for Java EE Developers that you can download from download.eclipse.org.
If you, like me, have a running Eclipse version with tons of other plugins and just want to export the war file adding the necessary plugin is the more convenient way. Following the Eclipse Wiki :
Go to Help > Install new Software
Choose All Available Sites
Open the Web, XML, Java EE and OSGi Enterprise Development section
Choose these three:
- Eclipse Java EE Developer Tools
- JST Server Adapters Extensions
- Eclipse Java Web Developer Tools
Press next and then accept any license agreements.
Then Finish all plugins will be installed.