Есть JSP страница
<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Meals</title>
</head>
<body>
<h2>MealsWithExceed</h2>
<table border=1>
<thead>
<tr>
<th>dateTime</th>
<th>description</th>
<th>calories</th>
<th>exceed</th>
</tr>
</thead>
<tbody>
<jsp:useBean id="MealsWithExceeded" scope="request" type="java.util.List"/>
<c:forEach items="${MealsWithExceeded}" var="mealWE">
<tr style="background-color:#{ (mealWE.exceed == true ? 'greenyellow' : 'red')}">
<td>
<fmt:parseDate value="${ mealWE.dateTime }" pattern="yyyy-MM-dd'T'HH:mm" var="parsedDateTime"
type="both"/>
<fmt:formatDate pattern="dd.MM.yyyy HH:mm" value="${ parsedDateTime }"/>
</td>
<td><c:out value="${mealWE.description}"/></td>
<td><c:out value="${mealWE.calories}"/></td>
<td><c:out value="${mealWE.exceed}"/></td>
</tr>
</c:forEach>
</tbody>
</table>
<p><a href="./">Home</a></p>
</body>
</html>
пытаюсь поменять цвет строки таблицы в зависимости от значения поля exceed
-
<tr style="background-color:#{ (mealWE.exceed == true ? 'greenyellow' : 'red')}">
подскажите, как правильно сделать. Спасибо!