Eclipse Kepler not generating web.xml automatically

对着背影说爱祢 提交于 2019-12-10 19:36:48

问题


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:


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.



来源:https://stackoverflow.com/questions/20019934/eclipse-kepler-not-generating-web-xml-automatically

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!