Removed JSP Tags

This section contains a list of the JSP tags that have been removed, along with advice on how to replace them with JSTL code (where possible/appropriate). The replacement code samples reference three standard tag libraries. In order to use these samples in your JSP pages you must include the tag libraries in your JSP files. For example:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jstl/functions" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
article:author
${article.author}
article:authors
${article.authors}
article:field
${article.fields[<field name>]}
article:hasNoRelation
<c:if test="${fn:length(article.relatedItems['summary']) eq 0}">
   <p>We have no related articles in the summary relation type</p>
</c:if>
article:hasRelation
<c:if test="${fn:length(article.relatedItems['summary']) gt 0}">
   <p>We have related articles in the summary relation type</p>
</c:if>
article:isType
<c:if test = "${article.articleTypeName == 'the-name-of-the-articley-type'}">
  //do something
</c:if>
article:homeSection
${article.section}
article:link
<a:href="${article.url">${article.title}</a>
article:sections
${article.sectionList}
article:lastChanged
<fmt:formatDate value="${article.lastModifiedDate}">
article:publishedDate
<fmt:formatDate value="${article.publishedDate}">
article:latestArticles

Use <article:list> instead

article:relatedArticles

Use

${article.relatedItems['summary']}

where summary is the name of the relation type

article:hasValue
<c:if test="${not empty article.fields[fieldname]}">
  Field with name 'fieldname' is not empty
</c:if>
article:hasNoValue
<c:if test="${empty article.fields[fieldname]}">
  Field with name 'fieldname' is empty
</c:if>
profile:field
${profile.fields[<field name>]}
profile:hasValue
<c:if test="${not empty profile.fields[fieldname]}">
  Field with name 'fieldname' is not empty
</c:if>
profile:hasNoValue
<c:if test="${empty profile.fields[fieldname]}">
  Field with name 'fieldname' is empty
</c:if>
section:lastChanged
<fmt:formatDate value="${pool.changedDate}">
section:link
<a:href="${section.url">${section.name}</a>
section:name
${section.name}
section:parameter
${section.parameters['the_parameter']}
util:dateFormatter
<fmt:formatDate value="${mydate}">
util:equal
<c:if test="${firstValue eq secondValue}">
  The values were equal
</c:if>
util:notEqual
<c:if test="${firstValue ne secondValue}">
  The values were not equal
</c:if>
util:isEmpty
<c:if test="${empty value}">
  Value is empty
</c:if>
util:isNotEmpty
<c:if test="${not empty value}">
  Value is not empty
</c:if>
util:switch
<c:choose>
  <c:when test="${condition1}">
    ...
  </c:when>
  <c:when test="${condition2}">
    ...
  </c:when>
  <c:otherwise>
    ...
  </c:otherwise>
</c:choose>

The removal of <util:switch> will also remove all occurrences of <util:case> and this tag has therefore also been removed from the distribution.

util:evaluate
${fn:substring(thecontent, from, to)}
util:valueOf
${object.value}
template:hasElement

No replacement

template:hasNoElement

No replacement

template:insert

Use jsp:include instead. A common.jsp file could, for example, be implemented like this:

<c:choose>
  <c:when test="${requestScope['com.escenic.context']=='art'}">
    <jsp:include page="art_default.jsp"/>
  </c:when>
  <c:otherwise>
     <jsp:include page="sec_default.jsp"/>
  </c:otherwise>
</c:choose>

For more information regarding this, please see the Escenic Content Engine Template Developer Guide.

template:defaultPresentationArticle

Replaced by built-in servlet filters.

template:defaultPresentationPool

Replaced by built-in servlet filters.

template:defaultPublication

Replaced by built-in servlet filters.

template:defaultSection

Replaced by built-in servlet filters.