2013-05-27 92 views
0

Ecplise向我展示了一個SyntaxError,但我不明白原因。JSP:此行多註釋

的代碼:

​​

感謝:

... 
    <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> 
    ... 

「錯誤」 是= moduleIncPage &>顯示在 「M」 上<%。

回答

1

你不能把標籤的標籤屬性中,這條線是無效的(不符合XHTML):在

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

看:

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

你應該那樣做,而不是代碼突出顯示,您已經看到了錯誤!

+0

太棒了!謝謝! :) – user2424300