1
Jstl 속성 $ {theDetail.id}을 JSTL의 foreach에서 Java 함수 안에서 어떻게 사용할 수 있습니까? 나는 많은 노력을했지만 아무런 효과가 없습니다.Java 메소드로 JSTL var을 조합하십시오.
<c:forEach items="<%= facade.getAllDetails() %>" var="theDetail">
// how to use ${theDetail.id} inside this java function
<c:forEach items="<%= facade.getSomeStuffById(...) %>" vars="theStuff">
${theStuf.name}
</c:forEach>
</c:forEach>
예, 그게 전부 어떤 범위의 속성 가정이다. 하지만 {theDetail.id}의 ID로 어떻게 사용할 수 있습니까? getSomeStuffById() 안에 $ {theDetail.id}를 추가하려고하면 500 오류가 발생합니다. – CodeWhisperer
'$ {facade.getSomeStuffById (theDetail.id)}' –
고마워요! 정말 멋져! – CodeWhisperer