Please help me to solve the issue. I built a WAR (uising Maven) but when I tried to deploy it in Tomcat I got an Exception:
org.apache.jasper.JasperException
: Unable to compile class for JSP:
The methodgetJspApplicationContext(ServletContext)
is undefined for the typeJspFactory
I found the cause of the problem on stackoverflow - the issue is in inconsistency of the Servlet API in project's classpath and relevant libraries used by current version of servlet container. The provided solution is to avoid adding any Servlet API relevant libraries (servlet-api.jar
, jstl.jar
, jsp-api.jar
, etc.) to lib
- folder. I also found a solution for Eclipse ([How do I import the javax.servlet API in my Eclipse project?). But I develop in IntellijIDEA and it differs from Eclipse. In my case there is no possibility to not add servlet-api.jar
and jstl-${version}.jar
to classpath. If I don't add them I can't compile a project. If anyone can assist me in the issue I would thankful a lot.