0

在我的 jsp 页面中,我使用此代码在锚点中动态添加标题属性。

<c:set var="titleAttributeValue" value="${(anchorListfields[3] != '') ? 'title=${anchorListfields[3]}' : ''}" scope="page" />

但不是在锚中显示标题属性的值,而是像这样显示 <a href="/content/aib/personal/home/iwanto.html" rel="nofollow" title="${anchorListfields[3]}"><span><span>Start my Business</span><i></i></span></a>

我怎么能做到这一点我的语法错误在哪里

4

1 回答 1

0

你的代码似乎正在工作。

  1. 确保在 /WEB-INF/lib 中有 JSTL 库。
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>指令添加到您的页面。

我正在使用 glassfish 4

于 2013-10-28T08:06:29.650 回答