右键点击项目 → “Java EE Tool” → “Generate Deployment descriptor stub” 即可生成web.xml文件 转载于:https://www.cnblogs.com/xww115/p/10813946.html