Do I really need web.xml for a Servlet based Java web application?

后端 未结 7 1061
无人共我
无人共我 2020-12-03 06:26

I haven\'t been working on real world web projects. At university we used both Servlets and Spring for Java web development. In both projects we were given web.xml files alr

7条回答
  •  失恋的感觉
    2020-12-03 07:14

    No, there will be no need of web.xml for servlet based application if you are using servlet version >3.0 and tomcat 7 as it will not run in the previous versions of tomcat.

    Annotation represents the metadata. If you use annotation, deployment descriptor (web.xml file) is not required. Have a look Here for all available annotation.

提交回复
热议问题