javax.el.PropertyNotFoundException: Property 'foo' not readable on type java.lang.Boolean

霸气de小男生 提交于 2019-11-28 22:45:54
BalusC

The is prefix is for boolean only, not for Boolean.

You have 2 options:

  1. Use boolean instead of Boolean.

  2. Or, rename method isPrimary() to getPrimary().

As to JAXB blunder of autogenerating the wrong method, you need to upgrade to at least JAXB 2.1.13 or to add -B-enableIntrospection to the wsimport call as per this JAXB documentation.

See also:

You can use a call directly to method score.isPrimary() like this:

<c:forEach var="score" items="${scores}">
<input type="checkbox"
       value="${score.isPrimary()}"
       name="someName"
       class="textField"/>
</c:forEach>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!