I am attempting to move a xml-based Spring MVC app to a Java Configuration based app. There appears to be a mismatch with the various java.servlet classes available in mave
I was facing the same problem wis gradle tomcat plugin. I updated the tomcat version to 8 and it worked.
plugins {
id "com.bmuschko.tomcat" version "2.2.2"
id "java"
id "eclipse"
id "idea"
id "war"
}
dependencies {
providedCompile ('javax.servlet:javax.servlet-api:3.1.0')
providedCompile ('javax.servlet.jsp:jsp-api:2.2')
compile ('org.springframework:spring-webmvc:4.2.1.RELEASE')
def tomcatVersion = '8.0.27'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
}