1

I have two JavaBeans.

  1. User
  2. Engineer

Engineer extends User.

User contains this property:

public String getName() { return name; }

My JSP contains:

<c:forEach var="engineer" items="${engineers}" >
    <c:out value="${engineer.Name}" />
</c:forEach>

The exception being thrown is:

javax.el.PropertyNotFoundException: Property 'Name' not found on type Engineer

Is this because JSTL won't find the inherited properties? Will I need to explicitly declare another getName property on Engineer even though it inherits getName from User?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Justin Skiles
  • 9,373
  • 6
  • 50
  • 61

1 Answers1

1

It should be

${engineer.name}

the name should be lower case.

evanwong
  • 5,054
  • 3
  • 31
  • 44