Tag Archives: ed

Using JSTL to traverse the list set reports an error

Use JSTL to report an error when traversing the list set

javax.el.PropertyNotFoundException: Property [department] not found on type [com.studying.model.Employee]

However, the Department attribute in the data transmitted from the back end has a value

Error reason

After careful search, it is found that the set/get method of attribute Department has been forgotten in the employee class

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }