JSTL の拡張 for ループでブレークを使用する方法。私のコード MyModelObjectを確認してください
@RequestMapping(value="/g/{domainId}/{userId}/{userName}/fullProfile.htm" ,method=RequestMethod.GET)
public String showFullProfile(@PathVariable("domainId")Long domainId,@PathVariable("userName")String userName,@PathVariable("userId")Long userId,Model model) throws Exception {
try {
List<Domains> domains = bal.getDomains();
model.put("domain",domains);
}
catch(Exception e)
{
}
return test;
}
test.jsp
<c:forEach items="${domain}" var="domain">
${domain.departmentName}
</c:forEach>
私の問題は毎回 6 レコードしかフェッチしないことですが、for ループが 6 番目のレコードに達したときに for ループを停止したいのですが、どうすればこれを行うことができますか?