Pessoal, tenho um objeto do tipo Pessoal, que representa os funcionários (que são motoristas) de uma empresa. Coloco alguns objetos desse tipo numa List, e depois seto um atributo:
List motoristas = importacaoService.findMotoristas();
request.setAttribute("motoristas", motoristas);
Seto um atributo para poder apresentar os dados:
<td nowrap="nowrap">
<bean:message key="importacao.motorista" />:<br>
<html:select property="pesMat" onchange="clearContainer('datatables');">
<html:option value="0">(Selecione um motorista)</html:option>
<c:forEach items="${motoristas}" var="motorista">
<html:option value="${motorista.pesMat}">${motorista.pesNom}</html:option>
</c:forEach>
</html:select>
</td>
até ae tudo bem, mas quando tento acessar o JSP para apresentar os dados, recebo o seguinte erro referente a linha <html:option value="${motorista.pesMat}">${motorista.pesNom}</html:option>:
javax.servlet.ServletException: javax.servlet.jsp.JspException: The "."
operator was supplied with an index value of type "java.lang.String" to be
applied to a List or array, but that value cannot be converted to an integer.
oq estou fazendo de errado?