What's the problem in this Java code,there is a constant red line under the for
loop, the code does work in a Java class but not in this one:
<%!
EntityManagerFactory emf = javax.persistence.Persistence.createEntityManagerFactory("Dima_TestPU");
RegionJpaController djc = new RegionJpaController(emf);
List<Region> lstRegion = djc.findRegionEntities();
for( Region device : lstRegion ) {
System.out.println(device.getId());
System.out.println(device.getName());
System.out.println(device.getLatitude());
}
%>