1.eclipse工具条,File->New->Dynamic web project
2.输入项目名称,然后点击Next按钮
3.两次next之后出现自动生成web.xml勾选框,选中之后会自动生成web.xml文件。