问题描述
我正在检查一个JAVA项目的代码库,我发现Eclipse显示错误如下: c:if test =$ {not empty queryClauses&&((activeRole eq'ROLE_ADMIN'&& &&&&&&&&Search.project.isPublic())或(not querySearch.project.isPublic())}}>
< div class =control-btns>
< input class =btn btn-primarytype =buttonid =updateQueryvalue =< spring:message code =query.updateQuery/>/>
< input class =btn btn-primarytype =buttonid =deleteQueryvalue =< spring:message code =query.deleteQuery/>/>
< / div>
< / c:if>
以下位置显示错误:
querySearch.project.isPublic()
错误是:
$ b
在此行找到多个注释:
- EL语法错误
- 遇到( (在第1行
第87列
期待其中之一:
。...
>...
<...
...
这是由一位离开公司的同事写的,所以我不能问他,他确信这是可以的,但是我对Java项目中出现错误感到不舒服。
从搜索我发现以下注释::
这是否同样的原因?有没有办法(通过更改项目代码或Eclipse设置)?将Eclipse更新以重新识别语法?
似乎是一个长期的Eclipse验证错误:
截止撰写(在提出此SO问题后2年),仍然似乎没有已正确修复。
另请参阅中的评论。
I am inspecting codebase of one JAVA project, and I found that Eclipse shows error at the following lines:
<c:if test="${not empty queryClauses && ((activeRole eq 'ROLE_ADMIN' && querySearch.project.isPublic()) or (not querySearch.project.isPublic()))}">
<div class="control-btns">
<input class="btn btn-primary" type="button" id="updateQuery" value="<spring:message code="query.updateQuery" />"/>
<input class="btn btn-primary" type="button" id="deleteQuery" value="<spring:message code="query.deleteQuery" />"/>
</div>
</c:if>
Error is being showed at the following place:
querySearch.project.isPublic()
Error is:
Multiple annotations found at this line:
- EL Syntax Error
- Encountered " "(" "( "" at line 1,
column 87.
Was expecting one of:
"." ...
">" ...
"gt" ...
"<" ...
...
It was written by a co-worker, who has left the company, so I cannot ask Him about it. He assured that it is OK, but I feel bad about seeing an error in Java project.
From searching I found the following comment: https://stackoverflow.com/a/18417643/508654:
Is this the same reason? Is there a work-around (by changing project code or Eclipse settings)? Will Eclipse be updated to reckognize the syntax?
Seems to be a longstanding Eclipse validation bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=352491
As of writing (2 years after this SO question was raised), it still doesn't appear to have been properly fixed.
Also see the comments in this similar question.
这篇关于Eclipse报告JSP文件中的语法错误,但应用程序可以正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!