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

后端 未结 12 642
有刺的猬
有刺的猬 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:32

    Exclusions and provided dependencies will not work in child projects.

    If you are using inheritance in Maven projects you must include this configuration on the parent pom.xml file. You will have a ... section in your pom.xml if you are using inheritance. So you will have something like this in your parent pom.xml:

    some.groupId
    1.0
    someArtifactId
    pom
    
        child-module-1
        child-module-2
    
    
        
            javax.servlet
            servlet-api
            2.5
            provided
        
        
            javax.servlet.jsp
            jsp-api
            2.1
            provided
        
    
    

提交回复
热议问题