Notice
Recent Posts
Recent Comments
Link
«   2025/10   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags more
Archives
Today
Total
관리 메뉴

jeongwon

[Error] The expression 'list' evaluated to a null value. 본문

Error log

[Error] The expression 'list' evaluated to a null value.

jeongwon_ 2022. 11. 8. 20:29

오류: 

The expression 'list' evaluated to a null value.

 

상황: 

update ${value} set show='n' where
<foreach collection="list" item="list" separator="or"
index="index">
${condition}=#{list}
</foreach>

 

위와 같은 mybatis 구문을 통해 배열로 들어온 리스트에 해당하는 레코드 값을 변경하고자 하였음.

 

해결:

JSP View 단에서부터 list 의 명칭이 잘못 설정되어 수정했음. 

<input name="qna_bno" type="checkbox"
value="${qna.bno}">