3
我想從jstl中選定的複選框將行發送到jsp。獲取選定的行值後需要將其發送給jsp request.So我將轉換爲toString。如何從JSTL轉換tostring?
如果我用<c:out value="${product.tostring()
得到EL錯誤。請指教。
<c:forEach items="${list}" var="product">
<td><input type="text" value='${product.featurename}' name="<c:out value="${product.featurename}" />" readonly="readonly"/></td>
<td><input type="text" value='${product.featureversion}' readonly="readonly"/></td>
<td><input type="text" value='${product.end_date}' readonly="readonly"/></td>
<td><input type="text" value='${product.new_end_date}' class="datepicker" name="<c:out value="${product.new_end_date}" />"/></td>
<td><input type="checkbox" value="<c:out value="${product}" />" name="newenddate" class="selectedId"/>
</c:forEach>
作爲@Alex說EL呼叫toString()方法隱含 –
從JSTL使用獲取字符串[] newenddate = req.getParameterValues( 「newenddate」); ,bean類「產品」。如何迭代那些值? – user2848031
請問,你能解釋一下這個問題嗎?或者發佈一個新的答案,使其更清晰易讀。 –