I've inherited a web application and when setting it up in Eclipse it shows errors in a particular JSP.
The errors have no description associated with them in the Problems view, and clicking them there takes me to the top of the JSP, where the red error underline appears halfway through the string like this:
<%@ page erro[rPage="/basicError.j]sp" %>
[<%@ page import="javax.s]ervlet.ServletContext" %>
Imagine a red 'error' underline under the parts bracketed by [] (bold, etc won't show in this code segment and I can't show the code at all unless it's in a code segment, hence using [ and ].
Other examples of the errors:
Clicking the red 'X' icon to the left of the lines does nothing.
I've tried re-importing the project, refreshing, validating, moving the lines around, etc, but I always get this error.
Does anyone know what's happening here?
I did try disabling the jsp validation but nothing really worked, so I tried the following and it worked.
The solution that worked for me, is given in this answer.
Go to project properties > Targeted runtimes > Select the checkbox for a runtime (Apache Tomcat 7 in my case).
That's all. Just build the project now and everything will be fine
Run it. Does it work? Then it's again the Eclipse's builtin JSP validator which is an epic fail. Just disable it in workspace preferences through Web > JSP Files > Validation > scroll list to very bottom and set all EL validation settings to Ignore. Also in the main Validation preference uncheck all checkboxes related to JSP. This however doesn't seem to remove every warning/error, but it at least minimizes the annoyance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With