在下面的代码中,例如page.currentPagePathwww.index,而value.pathwww.index.html。我想检查一下两者是否相等

<c:if test="${page.currentPagePath '.html' ne value.path} }">
                                    <li class="main-nav">
                                        <a class="main-nav-link"
                                           href="${value.redirectPath}">${value.pageTitle}</a>
                                    </li>
                                    </c:if>


在测试中如何在.html上附加page.currentPagePathpage.currentPagePath '.html'无效

最佳答案

连接器运算符与Java中的相同:+

${(page.currentPagePath + '.html') ne value.path}

08-04 09:31