Can some one help me with the exception I have.
in servlet i send list of countries to jsp
request.setAttribute("countries", allCountryList);
and in jsp i want to display them in dropdown list , i use foreach to fill the ddl with values
<c:forEach var="country" items="${requestScope.countries}" >
<option value="${country.countryNo}">${country.countryName}</option>
</c:forEach>
Strange exception says that countryName is not exist even it is exist
javax.el.PropertyNotFoundException: Property 'countryName' not found on type ps.iugaza.onlineinfosys.entities.Country
and here is country class
public class Country {
private String countryName;
private int countryNo;
public String getCoutnryName() {
return countryName;
}
public int getCountryNo() {
return countryNo;
}
}
Edited:
Have you built the project again? Maybe you add the name attribute and you havent compiled the project again.
The getter should be getCountryName instead of getCoutnryName