问题
I have a page with the following JSP tag:
<c:set var="task" value="${report.taskMap['bin:'.concat(bin.id)]}" />
This works fine, but Eclipse complains about it being a syntax error, presumably because the '.concat(bin.id)' part is a JSP 2.2 extension not supported in older versions of JSP. Is there any way of telling Eclipse to accept this syntax? Or, alternatively, is there a way of telling Eclipse not to consider JSP validation errors as errors, and mark them as warnings instead? I'd rather not turn off validation entirely — it is useful — but having the project marked as containing an error is causing all kinds of problems further down the line.
回答1:
Seems to be a longstanding Eclipse validation bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352491
As of writing (6 years after the bug was raised), it still doesn't appear to have been properly fixed.
Also see this similar question.
来源:https://stackoverflow.com/questions/19340866/how-to-get-eclipse-jsp-expression-language-validation-to-accept-jsp-2-2-el-const