so.. i created a function on mysql workbench for getting the age of a person from its birth date. On the mysql workbench i call the function like this:
SELECT get_age(fecha_nacimiento, NOW()) AS age
FROM pacientes
WHERE id_paciente = 2
An it give the correct answer, which is 2 on a column named "age"
but when i call it with jstl like this:
<sql:query var="edad" sql="select get_age(fecha_nacimiento, NOW()) as age from pacientes
where id_paciente=2" dataSource="${con }" ></sql:query>
<c:out value="${edad.age}"/>
i got an error that says :
javax.el.PropertyNotFoundException: Propiedad 'age' no hallada en el tipo org.apache.taglibs.standard.tag.common.sql.ResultImpl
which i believe in english would be:
javax.el.PropertyNotFoundException: The class `org.apache.taglibs.standard.tag.common.sql.ResultImpl` does not have the property 'age'`
I already checked that everything used on the query exists on the DB and it does, any help would be highly appreciated