With following structure, how can I make Eclipse build the WAR file correctly?
I need following folders to go into following output folders:
mail/src
Your www folder shouldn't be a source folder (with the small package icon). It should be a regular folder and reside at mail/war/www.
As for mail/src, just have a look at the build path of the project and make sure that the output folder is set to mail/war/WEB-INF/classes.