• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1646
  • Last Modified:

Custom tag attribute value cannot be runtime expression. value: "[${ed.updateDate}]"

When using this syntax, "<td><fmt:formatDate value="${ed.updateDate}" pattern="MMM"/></td>"
I get this error: Custom tag attribute value cannot be runtime expression. value: "[${ed.updateDate}]"

I have the proper libraries:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

and I just copied the syntax from another screen, see code snippet

Notes:
1. This works fine: {ed.updateDate}, displays       2011-06-06
2. My IDE says "Invalid attribute (value)"
/********** This works ************/

<td>
	<c:choose>
		<c:when test="${(detail.subjArea eq 'CLI' || detail.subjArea eq 'MEM' || detail.subjArea eq 'IDM') && detail.offsetDays ne 0}"><fmt:formatDate value="${detail.reportedDate}" pattern="MMM dd - E"/>&nbsp;&nbsp;<img src="images/<c:out value="${offsetIcon}" />" height="16" width="14" alt="" title="Change Date may not be correct !"/></c:when>
		<c:when test="${(detail.subjArea eq 'CLM' || detail.subjArea eq 'PCLM') && detail.offsetDays ne 0}"><a class='thickbox' href="<c:out value="${paidDateURL}" escapeXml="true"/>"><fmt:formatDate value="${detail.reportedDate}" pattern="MMM dd - E"/>&nbsp;<c:out value="${detail.numPaidDates}"/></a>&nbsp;&nbsp;<img src="images/<c:out value="${offsetIcon}" />" height="16" width="14" alt="" title="Paid Date may not be correct !"/></c:when>
		<c:when test="${(detail.subjArea eq 'CLM' || detail.subjArea eq 'PCLM') && detail.offsetDays eq 0}"><a class='thickbox' href="<c:out value="${paidDateURL}" escapeXml="true"/>"><fmt:formatDate value="${detail.reportedDate}" pattern="MMM dd - E"/>&nbsp;<c:out value="${detail.numPaidDates}"/></a></c:when>
		<c:otherwise><fmt:formatDate value="${detail.reportedDate}" pattern="MMM dd - E"/></c:otherwise>		
	</c:choose>
</td>

Open in new window

0
Alaska Cowboy
Asked:
Alaska Cowboy
  • 3
  • 2
2 Solutions
 
rrzCommented:
You could try replacing
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
with
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
0
 
Alaska CowboyAuthor Commented:
ok. I will try that Monday. but its odd that the <fmt> works in other screens.

thank you.
0
 
Alaska CowboyAuthor Commented:
Ok, I changed to
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

now get this:
/WEB-INF/jsp/parameter_list.jsp(95,67) JSPG0060E: Invalid jsp syntax []

My code is:
<td><fmt:formatDate value="${ed.updateDate}" pattern="MMM dd - E"</td>
0
 
rrzCommented:
><td><fmt:formatDate value="${ed.updateDate}" pattern="MMM dd - E"</td>  
You didn't close the fmt tag. Try
<td><fmt:formatDate value="${ed.updateDate}" pattern="MMM dd - E" /></td>
0
 
Alaska CowboyAuthor Commented:
bingo, thanks a lot, sorry for the debugging, I had it right in my original post, maybe all it needed was a space.

But good to go now !
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now