That will happen when you include server-specific libraries of a different server make/version in the /WEB-INF/lib
of your web application, such as jsp-api.jar
, el-api.jar
, servlet-api.jar
, etc. You need to remove them all. The /WEB-INF/lib
should not contain any server-specific libraries. They belongs in the specific server itself (Tomcat has them in its /lib
folder already).
This is by the way a pretty common beginner’s mistake whenever they encounter compilation errors on the JSP/Servlet API in their IDE project. This should have been solved differently, namely by integrating the server in the IDE and adding the server as “Target runtime” to the project.