Reputation: 2086
I have a Spring 4 MVC Maven project in Eclipse Mars
I have this error javax.servlet.jsp.JspException cannot be resolved to a type
in the JSP, even in my Project Facets -> Runtimes I have checked Apache Tomcat v7.0065
The error is in Edit time and I can find that type on the project's Java Build Path as M2_REPO/../javax.servlet-api-3.0.1.jar
Upvotes: 0
Views: 14107
Reputation: 1229
You may be looking at the wrong JAR file for JspException.
I am developing a Spring 4 app in Eclipse with a Maven project, but using an external Tomcat 8 server. I was receiving the same error message in a JSP in the editor until I created and added a User Library in Eclipse that contained 'jsp-api.jar', which is actually a link in my Ubuntu file system to a file named 'tomcat8-jsp-api.jar'.
Once I added this new user library to my build path and then did a 'Build Project' in Eclipse, the red markers went away. You may need to refresh the project after building. Hopefully this at least points you in the right direction.
Upvotes: 2