【问题标题】:JSP: Multiple Annotations at this lineJSP:此行的多个注释
【发布时间】:2013-05-27 09:00:18
【问题描述】:

Ecpise 显示一个 SyntaxError,但我不明白原因。

代码:

  ...
  <c:set var="moduleIncPage" value="${moduleIncPage}" scope="request"></c:set> 
  ...
  <c:if test="${not empty model.document.module}">
    <jsp:include page="<%=moduleIncPage %>" flush="true" />
   </c:if>
  ...

“错误”显示在 的“m”处:

  Multiple annotations found at this line:
- Syntax error, insert ")" to complete 
 MethodInvocation
- Syntax error, insert ";" to complete Statement
- Syntax error, insert ";" to complete Statement
- Syntax error, insert ")" to complete 

谢谢。

【问题讨论】:

    标签: jsp syntax annotations


    【解决方案1】:

    您不能将标签放在标签属性中,此行无效(不符合 XHTML):

    <jsp:include page="<%=moduleIncPage %>" flush="true" />
    

    你应该这样做:

    <jsp:include page="${moduleIncPage}" flush="true" />
    

    看看代码高亮,你已经看到错误了!

    【讨论】:

      猜你喜欢
      • 2015-10-02
      • 2015-12-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多