Eclipse (Helios) occasionally marks valid looking JSP content as having errors. It seems like it often breaks when I use the
This is an old question but thought I might mention I get this too in Juno on Mac OS X—specifically most often after i change a file externally and then refresh the project in Eclipse. Underlines in all sorts of odd places, even halfway through words in JSP comments.
Could (likely?!) be related to bug 376926 which apparently got fixed a bit over a week ago?
For me, while I was typing the line manually, I got an error until I closed the tag, but the error never went away. I found a line of code that was similar, and I deleted the offending code, copy and pasted the the good code, and then made changes inside the tag as needed. No more errors!!! Not an ideal solution, but it worked for me.
I had the same problem, the problem is the jsp-api
library, you can add the dependency to your pom (as explained in other answers) or you can also add the target run-time and eclipse will automatically add that library to your class-path:
Project -> Properties -> Targeted Runtimes
And select your server.
As many of you have mentioned, the issues is around the build path and missing libraries. I found a very simple fix to this build path issue. Here is the solution: Under 'Java Build Path' in eclipse, go to the 'Order and Export' tab, and make sure that the 'Apache Tomcat v7.0' libraries (or whichever version of Tomcat you installed with eclipse) are checked. This instantly fixes the problem. No hassle with anything else. :-)
There is no need to turn off any validation in that case either.