Right click on the project and select “Export…”. Now open the “MyEclipse JEE” node, click on “WAR file” and click the “Next” button. Type in or browse to a destination for your WAR file, select the “Export source files” option and click the Finish button. The WAR file that you specified as the destination, will be written, with the source in the WEB-INF/classes folder.
The above is for MyEclipse release 2013, but will be the same for release 2014. If you have an earlier release, I’d have to check if there are any differences.