Problem comparing Strings in JSTL
Hi,
I have the following code and basically need to determine whether or not the path attribute for the var 'cib_navLink' starts with the String Object (extranetUrl) from the scriplet code.
<%
Preferences prefs = (Preferences) pageContext.getAttribute(PageHelper.PREFS_ATT_NAME,PageContext.APPLICATION_SCOPE);
IItem item = (IItem) pageContext.getAttribute("requestItem");
HashMap sitePrefs = prefs.getSitePreferences(item);
String extranetUrl ="";
try
{
extranetUrl = (String) sitePrefs.get("extraneturl");
pageContext.setAttribute("extraneturl", extranetUrl, PageContext.REQUEST_SCOPE);
}
catch (Exception e)
{
System.out.println("Couldn't get an extranet Url from Site Prefs");
}
%>
<div class="siteMapcontent">
<div class="col">
<c:forEach items="${cib_navigationLinks}" var="cib_navLink_1" end="${cib_cursor}">
<h2 class="sitemap"><span class="dip" style="background-image:url(<c:out value="${cib_navLink_1.iconPath}"/>); background-position: left; background-repeat: no-repeat; !important;"></span>
<a href="<c:out value="${cib_navLink_1.path}"/>"><c:out value="${cib_navLink_1.text}" escapeXml="false" /></a>
</h2>
<c:if test="${cib_navLink_1.subLinks != null && cib_navLink_1.numSubLinks > 0}">
<ul class="itemList">
<c:forEach items="${cib_navLink_1.subLinks}" var="cib_navLink_2">
<li><a href="<c:out value="${cib_navLink_2.path}"/>"><c:out value="${cib_navLink_2.text}" escapeXml="false"/></a>
<c:if test="${cib_navLink_2.subLinks != null && cib_navLink_2.numSubLinks > 0}">
<ul class="subitemlist">
<c:forEach items="${cib_navLink_2.subLinks}" var="cib_navLink_3">
<li><a href="<c:out value="${cib_navLink_3.path}"/>"><c:out value="${cib_navLink_3.text}" escapeXml="false"/></a></li>
</c:forEach>
</ul>
</c:if>
</li>
</c:forEach>
</ul>
</c:if>
</c:forEach>
</div>
</div>
regards
chris

