One such problem has been encountered in applying the JSTL label C:foreach:
[Servlet error]-[action]: javax.servlet.jsp.JspException:An Error occurred while evaluating custom action attribute "Val UE ' with value ' ${claim.cltnum} ': Unable to find a value for ' cltnum ' in object of class ' Com.data.Claim ' using operator ." (NULL)
The literal meaning is: No Cltnum object was found ********
The investigation found that the causes of this problem are as follows:
In the Jstl tab, do the following when you c:foreach the action:
<c:foreach item= "${claimlist} var=" claim ">
<TR><TD nowrap class= "aTabletitle3" align= "Center" >
<div align= "center" >
<c:out value= "${claim.cltnum}"/>
</div>
</td></tr>
</c:foreach>
At this point, Jstl goes through the claimlist information and stores the information in a single object claim, and then in "${claim.cltnum}" it looks for claim's Getcltnum () method to get the Cltnum information.
But Strange is in jstl in the field of writing requirements very strict, a little problem will be an error, now is the problem caused by error is cltnum,
The rule that defines the domain in the JavaBean is incorrect, instead of "private String cltnum" There is no problem, similarly if it is cltnum will be the same error. JavaBean domain naming rules must ensure that the first letter and the second letter must be uppercase to be valid, otherwise, the C:foreach will be an error.
Remember to remember ...