ClassNotFoundException with ServletContextlistener

前端 未结 6 748
花落未央
花落未央 2020-12-11 04:42

I get an exception whenever I try getting context parameter from we.XML into a ServletContextListener class, I am really having hard times understa

6条回答
  •  抹茶落季
    2020-12-11 05:11

    I had the same problem running JUnit in a Tomcat 7 environment and I solved it adding a dependency in maven (pom.xml) like this:

        
            org.apache.tomcat
            tomcat-servlet-api
            7.0.54
            provided
        
    

提交回复
热议问题