New project missing web.xml

Eclips kepler, tomcat 7.
After create the project web.xml is not showing up.
Following the book ‘Learning Java 7’.
Help!

when you create a new vaadin project, don’t just click the finish button, click “next” till you see the web module setting, check the generate web.xml, then you will get it.

14410.png

In Vaadin 7+ a web.xml is not needed when using Servlet 3.0. That’s why when you create a new Vaadin 7 project the project doesn’t contain a web.xml but instead uses the Servlet annotations inside the UI class. When you don’t want or can’t use the Annotation/Servlet 3.0 (i don’t think Tomcat 7 is working properly with servlet 3.0) and instead want to use the “old” web.xml you can just copy it from an old Vaadin 6 project and change the values inside accordingly.

…or create the web.xml like 正午 于 suggested. Also make sure you remove the Servlet Annotations if you don’t want to use them.