创建Dymamic Web Project的时候不要忘记勾选这玩意(about servlet)
其实还有一个办法就是右键点击你的web项目名--->Java EE Tools-->Generate Deployment Descriptor Stub
这样就可以生成xml啦