私はそのセットのオブジェクトをjspページに表示したい。モデルのクラス - キャンセルには[cancelationDetails]が設定されています。タグ "c:set"タグの不正な本体が見つかりました。
public class Cancellation {
@OneToMany(fetch = FetchType.LAZY, mappedBy="cancellation")
private Set<cancellationDetails> cancel ;
public class cancellationDetails {
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "cancelId", nullable = false)
private Cancellation cancellation;
コントローラ
@RequestMapping(value = "/cancellationRecords", method = RequestMethod.GET)
public ModelAndView getList() {
List<Cancellation> cancellationRecords = dataservice.getCancellationRecords();
return new ModelAndView("master/CancellationRecords_master","cancellationList",cancellationRecords);
}
JSP - >リストからセットを表示しようとしています。
<c:forEach items="${cancellationList}" var="user">
<c:set value ="${cancellationList.cancel}" var="set">
<tr>
<td><c:out value="${user.cancelId}" /></td>
<td><c:out value="${user.merchant.merchant_name}" /></td>
<td><c:out value="${user.merchantNBR}" /></td>
<td><c:out value="${user.merchant.merchant_status}" /></td>
<td><c:out value="${user.merchant.handin_date}" /></td>
<td><c:out value="${user.merchant.close_date}" /></td>
<td><c:out value="${user.closingReason}" /></td>
<!--from set--> <td><c:out value="${set.achRejectAmount}"/></td>
<td><c:out value="${user.merchant.nsbcagent_id}" /></td>
<td><c:out value="${user.merchant.nsbcagent_name}" /></td>
</tr>
</c:set>
</c:forEach>
エラー
Encountered illegal body of tag "c:set" tag, given its attributes.</p><p>181:
var nameを別の文字列に変更しようとしてください! – PacMan