Object passed via jsp:param throws javax.el.PropertyNotFoundException: Property 'foo' not found on type java.lang.String

后端 未结 1 1356
孤城傲影
孤城傲影 2020-12-06 22:01

I know this might be silly question and i tried googling but didnt got perfect answer.

I am using following code



        
相关标签:
1条回答
  • 2020-12-06 22:48

    HTTP request parameters are treated as strings. With jsp:param it's basically been converted to string by String#valueOf(). Rather store it as object in the request scope with help of <c:set>.

    <c:forEach var="aggregatedBatchProgressMetrics" items="${batchProgressMetricsList}">  
        <c:set var="batchProgressMetrics" value="${aggregatedBatchProgressMetrics}" scope="request" />
        <jsp:include page="html/tableContentsDisplayer.jsp" />  
    </c:forEach>
    

    <tr>  
        <td class="tdcenter">${batchProgressMetrics["clientId"]}</td>    
        <td class="tdcenter">${batchProgressMetrics["instrumentStats"]["totalImntsCompleted"]}</td>  
        <td class="tdcenter">${batchProgressMetrics["instrumentStats"]["totalImntsRemaining"]}</td>
    </tr>  
    
    0 讨论(0)
提交回复
热议问题