Eclipse Kepler not generating web.xml automaticall

2019-07-04 03:18发布

I saw a tutorial according to which web.xml was being created automatically in the WEB-INF folder in a dynamic web project and it included all the servlets and all the JSP pages and HTML pages were being included automatically. However, I cannot find any such file in my project. The IDE is not showing any error in the jsp and servlets that I have created.

When I added the web.xml file myself, the server stopped working.

I am using Apache Tomcat 7. Am I missing something or have I not done the integration properly?

1条回答
仙女界的扛把子
2楼-- · 2019-07-04 03:49

You missed a checkbox which says generate web.xml just before hitting finish button while creating dynamic web project in eclipse. The project works fine without web.xml because it uses annotations for request mapping. enter image description here

查看更多
登录 后发表回答