jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

后端 未结 12 635
有刺的猬
有刺的猬 2020-11-27 03:58

I am running a Maven project which is also a dynamic web project. I have used all Spring libraries in Maven. I created web.xml, but when I start my Tomcat 7 ser

12条回答
  •  自闭症患者
    2020-11-27 04:24

    To fix it, set the scope to provided. This tells Maven use code servlet-api.jar for compiling and testing only, but NOT include it in the WAR file. The deployed container will “provide” the servlet-api.jar at runtime.

    
        javax.servlet
        servlet-api
        2.5
        provided
    
    

提交回复
热议问题