I'm trying to output a comma delimited list based on a varying list of statuses that 
will 
be input from a select menu in a form. I was trying to figure out how to avoid putting 
a 
comma after the last value, and it seemed like testing with the isLast() method of the 
LoopTagStatus class would be a good thing to use. I'm not quite sure how to go about 
using it, though. Reading about it, it looks like the 'varStatus' attribute of the 
<c:forEach> tag creates a variable to hold a LoopTagStatus object. My code below was 
how 
I assumed I would then be able to access the isLast() method:

<%@ page contentType="text/html; charset=iso-8859-1" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"; %>
<c:forEach items="${paramValues.status}" var="status_row" varStatus="loop_status">
    '${status_row.status_name}'
  <c:if test="${!(loop_status.isLast())}">, </c:if>
</c:forEach>


But when I do this, I get the following error back:

org.apache.jasper.JasperException: /report_status_data.jsp(20,3) The function isLast 
must 
be used with a prefix when a default namespace is not specified

Here's an example of the kind of output I'm trying to generate. The list has a 
possibility of being shorter or longer than this:

'In-Progress', 'Closed', 'Terminated', 'Withdrawn'

Thanks in advance!

Keith

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to