eclipse下导入了maven部署在tomcat6.0下出现问题

eclipse下导入了maven部署在tomcat6.0下出现问题图片说明

是不是 jar包冲突

在pom.xml文件中找到servlet-api 或者javax-servlet 的jar包配置。
看下version是否是2.5.
将scope属性设置为test

java.lang.NoSuchMethodError:javax.servlet.ServletContext.getEffectiveSessionTrackingModes()Ljava / util / Set;
此方法在Servlet 3.0中引入。此错误至少有以下原因:

你web.xml没有声明符合至少3.0的Servlet。
您的servlet容器至少不支持Servlet 3.0。
你有一个旧版本的servlet容器特定的库/WEB-INF/lib。
为了解决这个问题,

确保您的web.xml根声明符合Servlet 3.0:

 <?xml version="1.0" encoding="UTF-8"?>
<web-app 
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    version="3.0">

    <!-- Config here. -->

</web-app>

确保您正在部署到与Servlet 3.0兼容的容器。

来源:https://stackoverflow.com/questions/8969497/java-lang-nosuchmethoderror-javax-servlet-servletcontext-geteffectivesessiont