解决:
右击项目——>Java EE Tools——>Generate Deployment Descriptor Stub. 然后系统会在src/main/webapp/WEB_INF文件加下创建web.xml文件。